summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Token.pm
diff options
context:
space:
mode:
authorgerv%gerv.net <>2005-01-01 22:44:15 +0100
committergerv%gerv.net <>2005-01-01 22:44:15 +0100
commit4e2bfc82a0a1d70e3e0e79d27b9bcee8dfc25077 (patch)
tree7995ebb2391debcd774e93aab16411e04df8e28d /Bugzilla/Token.pm
parentb9cfd23ffdca5cf3efc90f19471c553085f4c913 (diff)
downloadbugzilla-4e2bfc82a0a1d70e3e0e79d27b9bcee8dfc25077.tar.gz
bugzilla-4e2bfc82a0a1d70e3e0e79d27b9bcee8dfc25077.tar.xz
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.pm19
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");