mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Changed from address when sending from yahoo or aol accounts
This commit is contained in:
parent
84cf760785
commit
b0942449bb
@ -1,6 +1,7 @@
|
||||
<?php namespace ninja\mailers;
|
||||
|
||||
use Mail;
|
||||
use Utils;
|
||||
|
||||
class Mailer {
|
||||
|
||||
@ -12,9 +13,18 @@ class Mailer {
|
||||
];
|
||||
|
||||
Mail::send($views, $data, function($message) use ($toEmail, $fromEmail, $fromName, $subject)
|
||||
{
|
||||
{
|
||||
$replyEmail = $fromEmail;
|
||||
|
||||
// We're unable to set the true fromEmail for emails sent from Yahoo or AOL accounts
|
||||
// http://blog.mandrill.com/yahoos-recent-dmarc-changes-and-how-that-impacts-senders.html
|
||||
if (strpos($fromEmail, '@yahoo.') !== false || strpos($fromEmail, '@aol.') !== FALSE)
|
||||
{
|
||||
$fromEmail = CONTACT_EMAIL;
|
||||
}
|
||||
|
||||
$message->to($toEmail)->from($fromEmail, $fromName)->sender($fromEmail, $fromName)
|
||||
->replyTo($fromEmail, $fromName)->returnPath($fromEmail)->subject($subject);
|
||||
->replyTo($replyEmail, $fromName)->subject($subject);
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user