--- ./Bugzilla/Config/MTA.pm.100089	2005-11-02 11:18:00.000000000 +0100
+++ ./Bugzilla/Config/MTA.pm	2005-11-02 11:18:13.000000000 +0100
@@ -63,23 +63,6 @@
   },
 
   {
-   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
--- ./Bugzilla/BugMail.pm.100089	2005-11-02 11:19:57.000000000 +0100
+++ ./Bugzilla/BugMail.pm	2005-11-02 15:35:40.000000000 +0100
@@ -33,6 +33,7 @@
 package Bugzilla::BugMail;
 
 use Bugzilla::DB;
+use Bugzilla::Error;
 use Bugzilla::User;
 use Bugzilla::Constants;
 use Bugzilla::Config qw(:DEFAULT $datadir);
@@ -749,11 +750,14 @@
 # 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 $vars = {
+      mailaddress => $login . Param('emailsuffix'),
+      login => $login,
+      password => $password };
+    my $msg;
+    my $template = Bugzilla->template;
+    $template->process("email/password.txt.tmpl", $vars, \$msg)
+      || ThrowTemplateError($template->error());
     MessageToMTA($msg);
 }
 
--- ./docs/xml/administration.xml.100089	2005-11-02 11:14:32.000000000 +0100
+++ ./docs/xml/administration.xml	2005-11-02 11:14:53.000000000 +0100
@@ -154,25 +154,6 @@
 
       <varlistentry>
         <term>
-          passwordmail
-        </term>
-        <listitem>
-          <para>
-            Every time a user creates an account, the text of this parameter
-            (with substitutions) is sent to the new user along with their
-            password message.
-          </para>
-
-          <para>
-            Add any text you wish to the "passwordmail" parameter box. For
-            instance, many people choose to use this box to give a quick 
-            training blurb about how to use Bugzilla at your site.
-          </para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term>
           movebugs
         </term>
         <listitem>
--- ./template/en/default/admin/params/mta.html.tmpl.100089	2005-11-02 11:15:43.000000000 +0100
+++ ./template/en/default/admin/params/mta.html.tmpl	2005-11-02 11:16:06.000000000 +0100
@@ -54,13 +54,6 @@
 
   smtpserver => "The SMTP server address (if using SMTP for mail delivery).",
 
-  passwordmail => "The email that gets sent to people to tell them their password. " _
-                  "Within this text, %mailaddress% gets replaced by the person's " _
-                  "email address, %login% gets replaced by the person's login " _
-                  "(usually the same thing), and %password% gets replaced by their " _
-                  "password. %<i>anythingelse</i>% gets replaced by the " _
-                  "definition of that parameter (as defined on this page).",
-
   newchangedmail => "The email that gets sent to people when a $terms.bug changes. Within " _
                     "this text, %to% gets replaced with the e-mail address of the " _
                     "person receiving the mail. %bugid% gets replaced by the $terms.bug " _
Index: template/en/default/email/password.txt.tmpl
===================================================================
RCS file: template/en/default/email/password.mail.tmpl
diff -N template/en/default/email/password.txt.tmpl
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ template/en/default/email/password.txt.tmpl        2 Nov 2005 12:34:23 -0000
@@ -0,0 +1,35 @@
+[%# 1.0@bugzilla.org %]
+[%# The contents of this file are subject to the Mozilla Public
+  # License Version 1.1 (the "License"); you may not use this file
+  # except in compliance with the License. You may obtain a copy of
+  # the License at http://www.mozilla.org/MPL/
+  #
+  # Software distributed under the License is distributed on an "AS
+  # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+  # implied. See the License for the specific language governing
+  # rights and limitations under the License.
+  #
+  # The Original Code is the Bugzilla Bug Tracking System.
+  #
+  # The Initial Developer of the Original Code is Netscape Communications
+  # Corporation. Portions created by Netscape are
+  # Copyright (C) 1998 Netscape Communications Corporation. All
+  # Rights Reserved.
+  #
+  # Contributor(s): Emmanuel Seyman <eseyman@linagora.com>
+  #%]
+
+[% PROCESS global/variables.none.tmpl %]
+
+From: bugzilla-daemon
+To: [% mailaddress %]
+Subject: Your [% terms.Bugzilla %] password.
+
+To use the wonders of [% terms.Bugzilla %], you can use the following:
+
+ E-mail address:  [% login %]
+       Password:  [% password %]
+
+ To change your password, go to:
+ [%+ Param("urlbase") %]userprefs.cgi
+
