Patchwork [5,of,6,RFC] mail: allow specifying local_hostname as localhostname

login
register
mail settings
Submitter Augie Fackler
Date Aug. 2, 2013, 2:15 p.m.
Message ID <4c9c2538d46bed89734a.1375452904@arthedain.pit.corp.google.com>
Download mbox | patch
Permalink /patch/1986/
State Deferred
Headers show

Comments

Augie Fackler - Aug. 2, 2013, 2:15 p.m.
# HG changeset patch
# User Augie Fackler <durin42@gmail.com>
# Date 1334373307 18000
#      Fri Apr 13 22:15:07 2012 -0500
# Node ID 4c9c2538d46bed89734a465ae01dbda483154425
# Parent  57d621716b4193c121ccd5d2eb3c1469b201514b
mail: allow specifying local_hostname as localhostname

Patch

diff --git a/mercurial/mail.py b/mercurial/mail.py
--- a/mercurial/mail.py
+++ b/mercurial/mail.py
@@ -85,7 +85,7 @@ 
 
 def _smtp(ui):
     '''build an smtp connection and return a function to send mail'''
-    local_hostname = ui.config('smtp', 'local_hostname')
+    local_hostname = ui.config('smtp', ['localhostname', 'local_hostname'])
     tls = ui.config('smtp', 'tls', 'none')
     # backward compatible: when tls = true, we use starttls.
     starttls = tls == 'starttls' or util.parsebool(tls)