From f07e4f2c164b6a1eb7f365f82f043b3af1867a15 Mon Sep 17 00:00:00 2001 From: epriestley Date: Sun, 6 Feb 2011 14:22:09 -0800 Subject: [PATCH] Make some email stuff work better. Summary: Test Plan: Reviewers: CC: --- conf/default.conf.php | 3 +++ .../controller/email/PhabricatorEmailLoginController.php | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/conf/default.conf.php b/conf/default.conf.php index 1e1f8eaac4..be32c7b456 100644 --- a/conf/default.conf.php +++ b/conf/default.conf.php @@ -40,6 +40,9 @@ return array( // terrible. If you disable this option, you must run the 'metamta_mta.php' // daemon or mail won't be handed off to the MTA. 'metamta.send-immediately' => true, + + // "Reply-To" email address to use for no-reply emails. + 'metamta.noreply' => 'noreply@example.com', // -- Access Control -------------------------------------------------------- // diff --git a/src/applications/auth/controller/email/PhabricatorEmailLoginController.php b/src/applications/auth/controller/email/PhabricatorEmailLoginController.php index e79998a254..1df339ef6e 100644 --- a/src/applications/auth/controller/email/PhabricatorEmailLoginController.php +++ b/src/applications/auth/controller/email/PhabricatorEmailLoginController.php @@ -63,11 +63,13 @@ class PhabricatorEmailLoginController extends PhabricatorAuthController { $etoken = $target_user->generateEmailToken(); $mail = new PhabricatorMetaMTAMail(); - $mail->setSubject('Phabricator Email Authentication'); + $mail->setSubject('[Phabricator] Password Reset'); + $mail->setFrom($target_user->getPHID()); $mail->addTos( array( - $target_user->getEmail(), + $target_user->getPHID(), )); + $mail->setReplyTo(PhabricatorEnv::getEnvConfig('metamta.noreply')); $mail->setBody( "blah blah blah ". PhabricatorEnv::getURI('/login/etoken/'.$etoken.'/').'?email='.phutil_escape_uri($target_user->getEmail()));