80 def __updateTestButton(self): |
80 def __updateTestButton(self): |
81 """ |
81 """ |
82 Private slot to update the enabled state of the test button. |
82 Private slot to update the enabled state of the test button. |
83 """ |
83 """ |
84 self.testButton.setEnabled( |
84 self.testButton.setEnabled( |
85 self.mailAuthenticationCheckBox.isChecked() and \ |
85 self.mailAuthenticationCheckBox.isChecked() and |
86 self.mailUserEdit.text() != "" and \ |
86 self.mailUserEdit.text() != "" and |
87 self.mailPasswordEdit.text() != "" and \ |
87 self.mailPasswordEdit.text() != "" and |
88 self.mailServerEdit.text() != "" |
88 self.mailServerEdit.text() != "" |
89 ) |
89 ) |
90 |
90 |
91 @pyqtSlot(bool) |
91 @pyqtSlot(bool) |
92 def on_mailAuthenticationCheckBox_toggled(self, checked): |
92 def on_mailAuthenticationCheckBox_toggled(self, checked): |
153 E5MessageBox.critical( |
153 E5MessageBox.critical( |
154 self, |
154 self, |
155 self.trUtf8("Login Test"), |
155 self.trUtf8("Login Test"), |
156 self.trUtf8( |
156 self.trUtf8( |
157 """<p>The login test failed.<br>Reason: {0}</p>""") |
157 """<p>The login test failed.<br>Reason: {0}</p>""") |
158 .format(errorStr)) |
158 .format(errorStr)) |
159 server.quit() |
159 server.quit() |
160 except (smtplib.SMTPException, socket.error) as e: |
160 except (smtplib.SMTPException, socket.error) as e: |
161 QApplication.restoreOverrideCursor() |
161 QApplication.restoreOverrideCursor() |
162 if isinstance(e, smtplib.SMTPResponseException): |
162 if isinstance(e, smtplib.SMTPResponseException): |
163 errorStr = e.smtp_error.decode() |
163 errorStr = e.smtp_error.decode() |