diff options
author | gerv%gerv.net <> | 2005-01-01 21:44:15 +0000 |
---|---|---|
committer | gerv%gerv.net <> | 2005-01-01 21:44:15 +0000 |
commit | 4e2bfc82a0a1d70e3e0e79d27b9bcee8dfc25077 (patch) | |
tree | 7995ebb2391debcd774e93aab16411e04df8e28d /Bugzilla/Token.pm | |
parent | b9cfd23ffdca5cf3efc90f19471c553085f4c913 (diff) | |
download | bugs-4e2bfc82a0a1d70e3e0e79d27b9bcee8dfc25077.tar bugs-4e2bfc82a0a1d70e3e0e79d27b9bcee8dfc25077.tar.gz bugs-4e2bfc82a0a1d70e3e0e79d27b9bcee8dfc25077.tar.bz2 bugs-4e2bfc82a0a1d70e3e0e79d27b9bcee8dfc25077.tar.xz bugs-4e2bfc82a0a1d70e3e0e79d27b9bcee8dfc25077.zip |
Bug 59351 - move all calls to sendmail to a central place. Patch by mkanat; r=gerv,vladd; a=justdave.
Diffstat (limited to 'Bugzilla/Token.pm')
-rw-r--r-- | Bugzilla/Token.pm | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/Bugzilla/Token.pm b/Bugzilla/Token.pm index 55362d184..90efe99bd 100644 --- a/Bugzilla/Token.pm +++ b/Bugzilla/Token.pm @@ -31,6 +31,7 @@ package Bugzilla::Token; use Bugzilla::Config; use Bugzilla::Error; +use Bugzilla::BugMail; use Date::Format; @@ -91,9 +92,7 @@ sub IssueEmailChangeToken { $template->process("account/email/change-old.txt.tmpl", $vars, \$message) || ThrowTemplateError($template->error()); - open SENDMAIL, "|/usr/lib/sendmail -t -i"; - print SENDMAIL $message; - close SENDMAIL; + Bugzilla::BugMail::MessageToMTA($message); $vars->{'token'} = $newtoken; $vars->{'emailaddress'} = $new_email . Param('emailsuffix'); @@ -102,10 +101,7 @@ sub IssueEmailChangeToken { $template->process("account/email/change-new.txt.tmpl", $vars, \$message) || ThrowTemplateError($template->error()); - open SENDMAIL, "|/usr/lib/sendmail -t -i"; - print SENDMAIL $message; - close SENDMAIL; - + Bugzilla::BugMail::MessageToMTA($message); } sub IssuePasswordToken { @@ -157,10 +153,7 @@ sub IssuePasswordToken { $vars, \$message) || ThrowTemplateError($template->error()); - open SENDMAIL, "|/usr/lib/sendmail -t -i"; - print SENDMAIL $message; - close SENDMAIL; - + Bugzilla::BugMail::MessageToMTA($message); } @@ -236,9 +229,7 @@ sub Cancel { $template->process("account/cancel-token.txt.tmpl", $vars, \$message) || ThrowTemplateError($template->error()); - open SENDMAIL, "|/usr/lib/sendmail -t -i"; - print SENDMAIL $message; - close SENDMAIL; + Bugzilla::BugMail::MessageToMTA($message); # Delete the token from the database. &::SendSQL("LOCK TABLES tokens WRITE"); |