hgext/patchbomb.py
changeset 2909 20b95aef3fe0
parent 2785 58a679745b38
child 2926 13cd2cdeff6a
--- a/hgext/patchbomb.py
+++ b/hgext/patchbomb.py
@@ -241,7 +241,7 @@ def patchbomb(ui, repo, *revs, **opts):
     ui.write('\n')
 
     if not opts['test'] and not opts['mbox']:
-        mail = ui.sendmail()
+        mailer = mail.connect(ui)
     parent = None
 
     # Calculate UTC offset
@@ -290,7 +290,7 @@ def patchbomb(ui, repo, *revs, **opts):
             ui.status('Sending ', m['Subject'], ' ...\n')
             # Exim does not remove the Bcc field
             del m['Bcc']
-            mail.sendmail(sender, to + bcc + cc, m.as_string(0))
+            mailer.sendmail(sender, to + bcc + cc, m.as_string(0))
 
 cmdtable = {
     'email':