mercurial/mail.py
changeset 8312 b87a50b7125c
parent 8225 46293a0c7e9f
child 8332 3e544c074459
equal deleted inserted replaced
8311:e0eb03bfa5af 8312:b87a50b7125c
     4 #
     4 #
     5 # This software may be used and distributed according to the terms of the
     5 # This software may be used and distributed according to the terms of the
     6 # GNU General Public License version 2, incorporated herein by reference.
     6 # GNU General Public License version 2, incorporated herein by reference.
     7 
     7 
     8 from i18n import _
     8 from i18n import _
       
     9 import util, encoding
     9 import os, smtplib, socket
    10 import os, smtplib, socket
    10 import email.Header, email.MIMEText, email.Utils
    11 import email.Header, email.MIMEText, email.Utils
    11 import util, encoding
       
    12 
    12 
    13 def _smtp(ui):
    13 def _smtp(ui):
    14     '''build an smtp connection and return a function to send mail'''
    14     '''build an smtp connection and return a function to send mail'''
    15     local_hostname = ui.config('smtp', 'local_hostname')
    15     local_hostname = ui.config('smtp', 'local_hostname')
    16     s = smtplib.SMTP(local_hostname=local_hostname)
    16     s = smtplib.SMTP(local_hostname=local_hostname)