From: mkanat%bugzilla.org <> Date: Sat, 16 Jun 2007 03:40:53 +0000 (+0000) Subject: Bug 384501: If you have a port name in the urlbase, SMTP may not work X-Git-Tag: bugzilla-3.0.1~64 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d7a5e4ebe059b926069d4200850792ae874b725;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);