Changes to support DMARC for emails

This commit is contained in:
Hillel Coren 2014-11-09 18:32:09 +02:00
parent 555245be33
commit 6a00a11e96
2 changed files with 3 additions and 9 deletions

View File

@ -15,16 +15,9 @@ 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; $replyEmail = $fromEmail;
$fromEmail = NINJA_FROM_EMAIL;
// We're unable to set the true fromEmail for emails sent from Yahoo or AOL accounts $message->to($toEmail)->from($fromEmail, $fromName)->replyTo($replyEmail, $fromName)->subject($subject);
// 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($replyEmail, $fromName)->subject($subject);
}); });
} }
} }

View File

@ -247,6 +247,7 @@ define('NINJA_GATEWAY_ID', GATEWAY_AUTHORIZE_NET);
define('NINJA_GATEWAY_CONFIG', '{"apiLoginId":"626vWcD5","transactionKey":"4bn26TgL9r4Br4qJ","testMode":"","developerMode":""}'); define('NINJA_GATEWAY_CONFIG', '{"apiLoginId":"626vWcD5","transactionKey":"4bn26TgL9r4Br4qJ","testMode":"","developerMode":""}');
define('NINJA_URL', 'https://www.invoiceninja.com'); define('NINJA_URL', 'https://www.invoiceninja.com');
define('NINJA_VERSION', '1.5.1'); define('NINJA_VERSION', '1.5.1');
define('NINJA_FROM_EMAIL', 'maildelivery@invoiceninja.com');
define('RELEASES_URL', 'https://github.com/hillelcoren/invoice-ninja/releases/'); define('RELEASES_URL', 'https://github.com/hillelcoren/invoice-ninja/releases/');
define('COUNT_FREE_DESIGNS', 4); define('COUNT_FREE_DESIGNS', 4);