summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authormozilla%colinogilvie.co.uk <>2006-02-22 07:36:03 +0100
committermozilla%colinogilvie.co.uk <>2006-02-22 07:36:03 +0100
commit3e11f000416834e4dd994012d8852e8e55251d1f (patch)
treefb34b2cd9ac32d618261c7c13927a89ab27f33e0 /Bugzilla
parentbf1e1f7c24389c140a8768cf3d243e6ffbdd2f8a (diff)
downloadbugzilla-3e11f000416834e4dd994012d8852e8e55251d1f.tar.gz
bugzilla-3e11f000416834e4dd994012d8852e8e55251d1f.tar.xz
Bug 100089: Templatise "passwordmail" email
Patch by Emmanuel Seyman <eseyman@linagora.com>; r=lpsolit; a=justdave
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/BugMail.pm14
-rw-r--r--Bugzilla/Config/MTA.pm17
2 files changed, 9 insertions, 22 deletions
diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm
index f065cb5fc..da4005730 100644
--- a/Bugzilla/BugMail.pm
+++ b/Bugzilla/BugMail.pm
@@ -32,6 +32,7 @@ use strict;
package Bugzilla::BugMail;
+use Bugzilla::Error;
use Bugzilla::User;
use Bugzilla::Constants;
use Bugzilla::Config qw(:DEFAULT $datadir);
@@ -793,11 +794,14 @@ sub encode_message_entity {
# Send the login name and password of the newly created account to the user.
sub MailPassword {
my ($login, $password) = (@_);
- my $template = Param("passwordmail");
- my $msg = perform_substs($template,
- {"mailaddress" => $login . Param('emailsuffix'),
- "login" => $login,
- "password" => $password});
+ my $template = Bugzilla->template;
+ my $vars = {
+ mailaddress => $login . Param('emailsuffix'),
+ login => $login,
+ password => $password };
+ my $msg;
+ $template->process("email/password.txt.tmpl", $vars, \$msg)
+ || ThrowTemplateError($template->error());
MessageToMTA($msg);
}
diff --git a/Bugzilla/Config/MTA.pm b/Bugzilla/Config/MTA.pm
index 4d2cd6703..d331927db 100644
--- a/Bugzilla/Config/MTA.pm
+++ b/Bugzilla/Config/MTA.pm
@@ -63,23 +63,6 @@ sub get_param_list {
},
{
- name => 'passwordmail',
- type => 'l',
- default => 'From: bugzilla-daemon
-To: %mailaddress%
-Subject: Your Bugzilla password.
-
-To use the wonders of Bugzilla, you can use the following:
-
- E-mail address: %login%
- Password: %password%
-
- To change your password, go to:
- %urlbase%userprefs.cgi
-'
- },
-
- {
name => 'newchangedmail',
type => 'l',
default => 'From: bugzilla-daemon