mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-09 16:32:39 +01:00
Make some email stuff work better.
Summary: Test Plan: Reviewers: CC:
This commit is contained in:
parent
df49a6c721
commit
f07e4f2c16
2 changed files with 7 additions and 2 deletions
|
@ -40,6 +40,9 @@ return array(
|
||||||
// terrible. If you disable this option, you must run the 'metamta_mta.php'
|
// terrible. If you disable this option, you must run the 'metamta_mta.php'
|
||||||
// daemon or mail won't be handed off to the MTA.
|
// daemon or mail won't be handed off to the MTA.
|
||||||
'metamta.send-immediately' => true,
|
'metamta.send-immediately' => true,
|
||||||
|
|
||||||
|
// "Reply-To" email address to use for no-reply emails.
|
||||||
|
'metamta.noreply' => 'noreply@example.com',
|
||||||
|
|
||||||
|
|
||||||
// -- Access Control -------------------------------------------------------- //
|
// -- Access Control -------------------------------------------------------- //
|
||||||
|
|
|
@ -63,11 +63,13 @@ class PhabricatorEmailLoginController extends PhabricatorAuthController {
|
||||||
$etoken = $target_user->generateEmailToken();
|
$etoken = $target_user->generateEmailToken();
|
||||||
|
|
||||||
$mail = new PhabricatorMetaMTAMail();
|
$mail = new PhabricatorMetaMTAMail();
|
||||||
$mail->setSubject('Phabricator Email Authentication');
|
$mail->setSubject('[Phabricator] Password Reset');
|
||||||
|
$mail->setFrom($target_user->getPHID());
|
||||||
$mail->addTos(
|
$mail->addTos(
|
||||||
array(
|
array(
|
||||||
$target_user->getEmail(),
|
$target_user->getPHID(),
|
||||||
));
|
));
|
||||||
|
$mail->setReplyTo(PhabricatorEnv::getEnvConfig('metamta.noreply'));
|
||||||
$mail->setBody(
|
$mail->setBody(
|
||||||
"blah blah blah ".
|
"blah blah blah ".
|
||||||
PhabricatorEnv::getURI('/login/etoken/'.$etoken.'/').'?email='.phutil_escape_uri($target_user->getEmail()));
|
PhabricatorEnv::getURI('/login/etoken/'.$etoken.'/').'?email='.phutil_escape_uri($target_user->getEmail()));
|
||||||
|
|
Loading…
Reference in a new issue