From 6a00a11e965c71ceafc27f55a2f135d2fdf03714 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Sun, 9 Nov 2014 18:32:09 +0200 Subject: [PATCH] Changes to support DMARC for emails --- app/ninja/mailers/Mailer.php | 11 ++--------- app/routes.php | 1 + 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/app/ninja/mailers/Mailer.php b/app/ninja/mailers/Mailer.php index 43c2d60eaebc..7f758d49ed32 100755 --- a/app/ninja/mailers/Mailer.php +++ b/app/ninja/mailers/Mailer.php @@ -15,16 +15,9 @@ class Mailer { Mail::send($views, $data, function($message) use ($toEmail, $fromEmail, $fromName, $subject) { $replyEmail = $fromEmail; + $fromEmail = NINJA_FROM_EMAIL; - // 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($replyEmail, $fromName)->subject($subject); + $message->to($toEmail)->from($fromEmail, $fromName)->replyTo($replyEmail, $fromName)->subject($subject); }); } } \ No newline at end of file diff --git a/app/routes.php b/app/routes.php index 7ae11a28b412..0c8af89f4c9f 100755 --- a/app/routes.php +++ b/app/routes.php @@ -247,6 +247,7 @@ define('NINJA_GATEWAY_ID', GATEWAY_AUTHORIZE_NET); define('NINJA_GATEWAY_CONFIG', '{"apiLoginId":"626vWcD5","transactionKey":"4bn26TgL9r4Br4qJ","testMode":"","developerMode":""}'); define('NINJA_URL', 'https://www.invoiceninja.com'); define('NINJA_VERSION', '1.5.1'); +define('NINJA_FROM_EMAIL', 'maildelivery@invoiceninja.com'); define('RELEASES_URL', 'https://github.com/hillelcoren/invoice-ninja/releases/'); define('COUNT_FREE_DESIGNS', 4);