Commit 54c992f7 authored by mkanat%bugzilla.org's avatar mkanat%bugzilla.org

Bug 384501: If you have a port name in the urlbase, SMTP may not work

Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit
parent 8cb6f0fa
...@@ -87,7 +87,7 @@ sub MessageToMTA { ...@@ -87,7 +87,7 @@ sub MessageToMTA {
# Sendmail will automatically append our hostname to the From # Sendmail will automatically append our hostname to the From
# address, but other mailers won't. # address, but other mailers won't.
my $urlbase = Bugzilla->params->{'urlbase'}; my $urlbase = Bugzilla->params->{'urlbase'};
$urlbase =~ m|//([^/]+)/?|; $urlbase =~ m|//([^:/]+)[:/]?|;
$hostname = $1; $hostname = $1;
$from .= "\@$hostname" if $from !~ /@/; $from .= "\@$hostname" if $from !~ /@/;
$email->header_set('From', $from); $email->header_set('From', $from);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment