mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 03:29:03 -05:00 
			
		
		
		
	Refactor reply_to setting
This commit is contained in:
		
							parent
							
								
									0ae8b85a35
								
							
						
					
					
						commit
						7a4513da7d
					
				@ -182,4 +182,13 @@ trait SendsEmails
 | 
			
		||||
 | 
			
		||||
        return Domain::getEmailFromId($this->domain_id);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function getReplyToEmail()
 | 
			
		||||
    {
 | 
			
		||||
        if (! $this->isPro()) {
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return $this->reply_to_email;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -199,7 +199,7 @@ class ContactMailer extends Mailer
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        $subject = $this->templateService->processVariables($subject, $variables);
 | 
			
		||||
        $fromEmail = $account->reply_to_email ?: $user->email;
 | 
			
		||||
        $fromEmail = $account->getReplyToEmail() ?: $user->email;
 | 
			
		||||
        $view = $account->getTemplateView(ENTITY_INVOICE);
 | 
			
		||||
 | 
			
		||||
        $response = $this->sendTo($invitation->contact->email, $fromEmail, $account->getDisplayName(), $subject, $view, $data);
 | 
			
		||||
@ -291,7 +291,7 @@ class ContactMailer extends Mailer
 | 
			
		||||
        $data['invoice_id'] = $payment->invoice->id;
 | 
			
		||||
 | 
			
		||||
        $view = $account->getTemplateView('payment_confirmation');
 | 
			
		||||
        $fromEmail = $account->reply_to_email ?: $user->email;
 | 
			
		||||
        $fromEmail = $account->getReplyToEmail() ?: $user->email;
 | 
			
		||||
 | 
			
		||||
        if ($user->email && $contact->email) {
 | 
			
		||||
            $this->sendTo($contact->email, $fromEmail, $accountName, $subject, $view, $data);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user