mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04: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;
|
<?php namespace ninja\mailers;
|
||||||
|
|
||||||
use Mail;
|
use Mail;
|
||||||
|
use Utils;
|
||||||
|
|
||||||
class Mailer {
|
class Mailer {
|
||||||
|
|
||||||
@ -13,8 +14,17 @@ class Mailer {
|
|||||||
|
|
||||||
Mail::send($views, $data, function($message) use ($toEmail, $fromEmail, $fromName, $subject)
|
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)
|
$message->to($toEmail)->from($fromEmail, $fromName)->sender($fromEmail, $fromName)
|
||||||
->replyTo($fromEmail, $fromName)->returnPath($fromEmail)->subject($subject);
|
->replyTo($replyEmail, $fromName)->subject($subject);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user