On Tuesday 28 March 2006 23:46, Chris Lawrence wrote: > On 3/29/06, Adam Porter <[EMAIL PROTECTED]> wrote: > > It's been a while; could this (seemingly simple) bug please be fixed? > > It's one of those things waiting for the reportbug 4 rewrite. > > That said, a patch would get it fixed really quickly. Money might also do > it... > > > Chris
Well, here's my meager attempt at a patch. Note that a) I know very little of Python; b) I'm not sure how to properly test my changes without submitting actual bugs; c) I don't know how to create a proper diff; d) maybe I did this all wrong. But at least it's a start. :) Adam
353,380c353,372
< # Modified by AP 2006-03-29
< while failed != True:
< ewrite("Connecting to %s via SMTP...\n", smtphost)
< try:
< conn = smtplib.SMTP(smtphost)
< if smtptls:
< conn.starttls()
< if smtpuser:
< if not smtppasswd:
< smtppasswd = ui.get_password(
< 'Enter SMTP password for [EMAIL PROTECTED]: ' %
< (smtpuser, smtphost))
< conn.login(smtpuser, smtppasswd)
< conn.sendmail(fromaddr, toaddrs, smtp_message)
< conn.quit()
< except (socket.error, smtplib.SMTPException), x:
<
< # If wrong password, try again...
< if smtplib.SMTPResponseException.smtp_code == '535'
< ewrite('SMTP error: authentication failed. Try again.')
< continue
<
< failed = True
< ewrite('SMTP send failure: %s\n', x)
< fh, msgname = TempFile(prefix=tfprefix)
< fh.write(message)
< fh.close()
< ewrite('Wrote bug report to %s\n', msgname)
---
> ewrite("Connecting to %s via SMTP...\n", smtphost)
> try:
> conn = smtplib.SMTP(smtphost)
> if smtptls:
> conn.starttls()
> if smtpuser:
> if not smtppasswd:
> smtppasswd = ui.get_password(
> 'Enter SMTP password for [EMAIL PROTECTED]: ' %
> (smtpuser, smtphost))
> conn.login(smtpuser, smtppasswd)
> conn.sendmail(fromaddr, toaddrs, smtp_message)
> conn.quit()
> except (socket.error, smtplib.SMTPException), x:
> failed = True
> ewrite('SMTP send failure: %s\n', x)
> fh, msgname = TempFile(prefix=tfprefix)
> fh.write(message)
> fh.close()
> ewrite('Wrote bug report to %s\n', msgname)
pgpWrl06mCl5N.pgp
Description: PGP signature

