mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-10-31 06:37:32 -04:00 
			
		
		
		
	Updates for unsubscribe links => hosted online
This commit is contained in:
		
							parent
							
								
									50cd085933
								
							
						
					
					
						commit
						c25cee6edf
					
				| @ -139,7 +139,7 @@ class TemplateEmail extends Mailable | ||||
|                 'whitelabel' => $this->client->user->account->isPaid() ? true : false, | ||||
|                 'logo' => $this->company->present()->logo($settings), | ||||
|                 'links' => $this->build_email->getAttachmentLinks(), | ||||
|                 'email_preferences' => URL::signedRoute('client.email_preferences', ['entity' => $this->invitation->getEntityString(), 'invitation_key' => $this->invitation->key]), | ||||
|                 'email_preferences' => (Ninja::isHosted() && in_array($settings->email_sending_method, ['default', 'mailgun'])) ? URL::signedRoute('client.email_preferences', ['entity' => $this->invitation->getEntityString(), 'invitation_key' => $this->invitation->key]) : false, | ||||
|             ]); | ||||
| 
 | ||||
|         foreach ($this->build_email->getAttachments() as $file) { | ||||
|  | ||||
| @ -11,13 +11,14 @@ | ||||
| 
 | ||||
| namespace App\Services\Email; | ||||
| 
 | ||||
| use App\Utils\Ninja; | ||||
| use App\Models\Document; | ||||
| use Illuminate\Mail\Attachment; | ||||
| use Illuminate\Mail\Mailable; | ||||
| use Illuminate\Mail\Mailables\Content; | ||||
| use Illuminate\Mail\Mailables\Envelope; | ||||
| use Illuminate\Mail\Mailables\Headers; | ||||
| use Illuminate\Mail\Attachment; | ||||
| use Illuminate\Support\Facades\URL; | ||||
| use Illuminate\Mail\Mailables\Content; | ||||
| use Illuminate\Mail\Mailables\Headers; | ||||
| use Illuminate\Mail\Mailables\Envelope; | ||||
| 
 | ||||
| class EmailMailable extends Mailable | ||||
| { | ||||
| @ -77,7 +78,7 @@ class EmailMailable extends Mailable | ||||
|                 'company' => $this->email_object->company, | ||||
|                 'greeting' => '', | ||||
|                 'links' => array_merge($this->email_object->links, $links->toArray()), | ||||
|                 'email_preferences' => $this->email_object->invitation  | ||||
|                 'email_preferences' => (Ninja::isHosted() && in_array($this->email_object->settings->email_sending_method, ['default', 'mailgun']) && $this->email_object->invitation)  | ||||
|                     ? URL::signedRoute('client.email_preferences', ['entity' => $this->email_object->invitation->getEntityString(), 'invitation_key' => $this->email_object->invitation->key])  | ||||
|                     : false, | ||||
|             ] | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user