Simplify and demuddle MetaMTA send pathways

Summary:
I pretty shortsightedly made sending a side effect of save() in the case that a
server is configured for immediate sending. Move this out, make it explicit, and
get rid of all the tangles surrounding it.

The web tool now ignores the server setting and only repsects the checkbox,
which makes far more sense.

Test Plan:
Sent mails from Maniphest, Differential, and the web console. Also ran all the
unit tests. Verified headers from Maniphest.

Reviewed By: rm
Reviewers: aran, rm
CC: tuomaspelkonen, rm, jungejason, aran
Differential Revision: 200
This commit is contained in:
epriestley
2011-04-30 22:51:25 -07:00
parent 91d009664b
commit 6bec3d2e4f
7 changed files with 23 additions and 28 deletions

View File

@@ -74,9 +74,9 @@ class PhabricatorEmailLoginController extends PhabricatorAuthController {
$target_user->getPHID(),
));
$mail->setBody(
"blah blah blah ".
"here is your link ".
PhabricatorEnv::getURI('/login/etoken/'.$etoken.'/').'?email='.phutil_escape_uri($target_user->getEmail()));
$mail->save();
$mail->saveAndSend();
$view = new AphrontRequestFailureView();
$view->setHeader('Check Your Email');