equal
deleted
inserted
replaced
296 call as sendmail(sender, list-of-recipients, msg).''' |
296 call as sendmail(sender, list-of-recipients, msg).''' |
297 |
297 |
298 def smtp(): |
298 def smtp(): |
299 '''send mail using smtp.''' |
299 '''send mail using smtp.''' |
300 |
300 |
301 s = smtplib.SMTP() |
301 local_hostname = self.config('smtp', 'local_hostname') |
|
302 s = smtplib.SMTP(local_hostname=local_hostname) |
302 mailhost = self.config('smtp', 'host') |
303 mailhost = self.config('smtp', 'host') |
303 if not mailhost: |
304 if not mailhost: |
304 raise util.Abort(_('no [smtp]host in hgrc - cannot send mail')) |
305 raise util.Abort(_('no [smtp]host in hgrc - cannot send mail')) |
305 mailport = int(self.config('smtp', 'port', 25)) |
306 mailport = int(self.config('smtp', 'port', 25)) |
306 self.note(_('sending mail: smtp host %s, port %s\n') % |
307 self.note(_('sending mail: smtp host %s, port %s\n') % |