UI/EmailDialog.py

changeset 550
22b951013193
parent 541
00e1a5d060c5
child 564
b3d966393ba9
equal deleted inserted replaced
549:fe99d46d56c8 550:22b951013193
280 return False 280 return False
281 try: 281 try:
282 server.login(Preferences.getUser("MailServerUser"), 282 server.login(Preferences.getUser("MailServerUser"),
283 password) 283 password)
284 except (smtplib.SMTPException, socket.error) as e: 284 except (smtplib.SMTPException, socket.error) as e:
285 res = E5MessageBox.critical(self, 285 res = E5MessageBox.retryAbort(self,
286 self.trUtf8("Send bug report"), 286 self.trUtf8("Send bug report"),
287 self.trUtf8("""<p>Authentication failed.<br>Reason: {0}</p>""") 287 self.trUtf8("""<p>Authentication failed.<br>Reason: {0}</p>""")
288 .format(str(e)), 288 .format(str(e)),
289 QMessageBox.StandardButtons(\ 289 E5MessageBox.Critical)
290 QMessageBox.Abort | \ 290 if res:
291 QMessageBox.Retry),
292 QMessageBox.Retry)
293 if res == QMessageBox.Retry:
294 return self.__sendmail(msg) 291 return self.__sendmail(msg)
295 else: 292 else:
296 return False 293 return False
297 294
298 QApplication.setOverrideCursor(QCursor(Qt.WaitCursor)) 295 QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
304 QApplication.restoreOverrideCursor() 301 QApplication.restoreOverrideCursor()
305 res = E5MessageBox.critical(self, 302 res = E5MessageBox.critical(self,
306 self.trUtf8("Send bug report"), 303 self.trUtf8("Send bug report"),
307 self.trUtf8("""<p>Message could not be sent.<br>Reason: {0}</p>""") 304 self.trUtf8("""<p>Message could not be sent.<br>Reason: {0}</p>""")
308 .format(str(e)), 305 .format(str(e)),
309 QMessageBox.StandardButtons(\ 306 E5MessageBox.Critical)
310 QMessageBox.Abort | \ 307 if res:
311 QMessageBox.Retry),
312 QMessageBox.Retry)
313 if res == QMessageBox.Retry:
314 return self.__sendmail(msg) 308 return self.__sendmail(msg)
315 else: 309 else:
316 return False 310 return False
317 return True 311 return True
318 312

eric ide

mercurial