From: mkanat%bugzilla.org <> Date: Sat, 16 Jun 2007 03:39:37 +0000 (+0000) Subject: Bug 384501: If you have a port name in the urlbase, SMTP may not work X-Git-Tag: bugzilla-3.1.2~181 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=54c992f744ce383044456266efcad6b1048576d9;p=thirdparty%2Fbugzilla.git Bug 384501: If you have a port name in the urlbase, SMTP may not work Patch By Max Kanat-Alexander r=LpSolit, a=LpSolit --- diff --git a/Bugzilla/Mailer.pm b/Bugzilla/Mailer.pm index e0f598b3df..1d4a90a4f6 100644 --- a/Bugzilla/Mailer.pm +++ b/Bugzilla/Mailer.pm @@ -87,7 +87,7 @@ sub MessageToMTA { # Sendmail will automatically append our hostname to the From # address, but other mailers won't. my $urlbase = Bugzilla->params->{'urlbase'}; - $urlbase =~ m|//([^/]+)/?|; + $urlbase =~ m|//([^:/]+)[:/]?|; $hostname = $1; $from .= "\@$hostname" if $from !~ /@/; $email->header_set('From', $from);