my $msg = PerformSubsts($template, \%substs);
- MessageToMTA($msg);
+ MessageToMTA($msg, $person);
push(@sentlist, $person);
return 1;
}
-# XXX: Should eventually add $mail_from and $mail_to options to
-# control the SMTP Envelope. -mkanat
-sub MessageToMTA ($) {
- my ($msg) = (@_);
+sub MessageToMTA ($;$$) {
+ my ($msg, $rcpt_to) = (@_);
my $sendmailparam = "";
unless (Param("sendmailnow")) {
$template->process("account/email/change-old.txt.tmpl", $vars, \$message)
|| ThrowTemplateError($template->error());
- Bugzilla::BugMail::MessageToMTA($message);
+ Bugzilla::BugMail::MessageToMTA($message, $vars->{'emailaddress'});
$vars->{'token'} = $newtoken;
$vars->{'emailaddress'} = $new_email . Param('emailsuffix');
$template->process("account/email/change-new.txt.tmpl", $vars, \$message)
|| ThrowTemplateError($template->error());
- Bugzilla::BugMail::MessageToMTA($message);
+ Bugzilla::BugMail::MessageToMTA($message, $vars->{'emailaddress'});
}
sub IssuePasswordToken {
$vars, \$message)
|| ThrowTemplateError($template->error());
- Bugzilla::BugMail::MessageToMTA($message);
+ Bugzilla::BugMail::MessageToMTA($message, $vars->{'emailaddress'});
}
$template->process("account/cancel-token.txt.tmpl", $vars, \$message)
|| ThrowTemplateError($template->error());
- Bugzilla::BugMail::MessageToMTA($message);
+ Bugzilla::BugMail::MessageToMTA($message, $vars->{'emailaddress'});
# Delete the token from the database.
&::SendSQL("LOCK TABLES tokens WRITE");
"login" => $login,
"password" => $password});
- Bugzilla::BugMail::MessageToMTA($msg);
+ Bugzilla::BugMail::MessageToMTA($msg, $login . Param('emailsuffix'));
}
sub PutHeader {
<!-- <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"> -->
-<!-- $Id: installation.xml,v 1.72.2.20 2005/03/09 18:58:23 travis%sedsystems.ca Exp $ -->
+<!-- $Id: installation.xml,v 1.72.2.21 2005/03/19 11:22:55 mkanat%kerio.com Exp $ -->
<chapter id="installing-bugzilla">
<title>Installing Bugzilla</title>
</section>
<section id="win32-code-changes">
- <title>Code changes required to run on win32</title>
+ <title>Code changes required to run on Win32</title>
<para>
- Bugzilla on win32 is mostly supported out of the box; one
+ Bugzilla on Win32 is mostly supported out of the box; one
remaining issue is related to bug email. To make bug email
work on Win32 (until
<ulink url="http://bugzilla.mozilla.org/show_bug.cgi?id=49893">bug
49893</ulink> lands), the
simplest way is to have the Net::SMTP Perl module installed and
- change this line in the file Bugzilla/Bugmail.pm:
+ change these lines in the file Bugzilla/Bugmail.pm:
</para>
<programlisting>
use Net::SMTP;
my $smtp_server = 'smtp.mycompany.com'; # change this
+($enableSendMail && $rcpt_to) || return;
+
# Use die on error, so that the mail will be in the 'unsent mails' and
# can be sent from the sanity check page.
my $smtp = Net::SMTP->new($smtp_server) ||
die 'Cannot connect to server \'$smtp_server\'';
$smtp->mail('bugzilla-daemon@mycompany.com'); # change this
-$smtp->to($person);
+$smtp->to($rcpt_to);
$smtp->data();
$smtp->datasend($msg);
$smtp->dataend();
domain of the sending email address (after the '@') in the
above lines of code.
</para>
+ <para>
+ Please be aware that flag email will continue not to work.
+ </para>
</section>
<section id="win32-http">
my $msg = PerformSubsts(Param("voteremovedmail"),
\%substs);
- Bugzilla::BugMail::MessageToMTA($msg);
+ Bugzilla::BugMail::MessageToMTA($msg, $substs{'to'});
}
SendSQL("SELECT SUM(vote_count) FROM votes WHERE bug_id = $id");
my $v = FetchOneColumn();
$header.= "Subject: $subject\n\n";
my $sendmessage = $header . $message . "\n";
- Bugzilla::BugMail::MessageToMTA($sendmessage);
+ Bugzilla::BugMail::MessageToMTA($sendmessage, $recipients[0]);
Log($subject . " sent to: $to");
}
$msg .= "\n";
-Bugzilla::BugMail::MessageToMTA($msg);
+Bugzilla::BugMail::MessageToMTA($msg, $to);
my $logstr = "XML: bugs $buglist sent to $to";
Log($logstr);
$msg .= " -> ${urlbase}show_bug.cgi?id=$i\n";
}
- Bugzilla::BugMail::MessageToMTA($msg);
+ Bugzilla::BugMail::MessageToMTA($msg, $substs{'email'});
print "$email " . join(" ", @{$bugs{$email}}) . "\n";
}