equal
deleted
inserted
replaced
163 ui.note(_(b'(authenticating to mail server as %s)\n') % username) |
163 ui.note(_(b'(authenticating to mail server as %s)\n') % username) |
164 username = encoding.strfromlocal(username) |
164 username = encoding.strfromlocal(username) |
165 try: |
165 try: |
166 s.login(username, password) |
166 s.login(username, password) |
167 except smtplib.SMTPException as inst: |
167 except smtplib.SMTPException as inst: |
168 raise error.Abort(inst) |
168 raise error.Abort(stringutil.forcebytestr(inst)) |
169 |
169 |
170 def send(sender, recipients, msg): |
170 def send(sender, recipients, msg): |
171 try: |
171 try: |
172 return s.sendmail(sender, recipients, msg) |
172 return s.sendmail(sender, recipients, msg) |
173 except smtplib.SMTPRecipientsRefused as inst: |
173 except smtplib.SMTPRecipientsRefused as inst: |