Mercurial > public > mercurial-scm > hg
comparison hgext/patchbomb.py @ 2889:20b95aef3fe0
Move ui.sendmail to mail.connect/sendmail
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 15 Aug 2006 14:06:50 -0500 |
parents | 58a679745b38 |
children | 13cd2cdeff6a |
comparison
equal
deleted
inserted
replaced
2888:3848488244fc | 2889:20b95aef3fe0 |
---|---|
239 msgs.insert(0, msg) | 239 msgs.insert(0, msg) |
240 | 240 |
241 ui.write('\n') | 241 ui.write('\n') |
242 | 242 |
243 if not opts['test'] and not opts['mbox']: | 243 if not opts['test'] and not opts['mbox']: |
244 mail = ui.sendmail() | 244 mailer = mail.connect(ui) |
245 parent = None | 245 parent = None |
246 | 246 |
247 # Calculate UTC offset | 247 # Calculate UTC offset |
248 if time.daylight: offset = time.altzone | 248 if time.daylight: offset = time.altzone |
249 else: offset = time.timezone | 249 else: offset = time.timezone |
288 fp.close() | 288 fp.close() |
289 else: | 289 else: |
290 ui.status('Sending ', m['Subject'], ' ...\n') | 290 ui.status('Sending ', m['Subject'], ' ...\n') |
291 # Exim does not remove the Bcc field | 291 # Exim does not remove the Bcc field |
292 del m['Bcc'] | 292 del m['Bcc'] |
293 mail.sendmail(sender, to + bcc + cc, m.as_string(0)) | 293 mailer.sendmail(sender, to + bcc + cc, m.as_string(0)) |
294 | 294 |
295 cmdtable = { | 295 cmdtable = { |
296 'email': | 296 'email': |
297 (patchbomb, | 297 (patchbomb, |
298 [('a', 'attach', None, 'send patches as inline attachments'), | 298 [('a', 'attach', None, 'send patches as inline attachments'), |