Preferences/ConfigurationPages/EmailPage.py

changeset 1061
3e21869872e3
parent 1032
f7c2e348f6f3
child 1122
9871c792eaca
equal deleted inserted replaced
1059:700df567f70b 1061:3e21869872e3
114 """ 114 """
115 QApplication.setOverrideCursor(QCursor(Qt.WaitCursor)) 115 QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
116 QApplication.processEvents() 116 QApplication.processEvents()
117 try: 117 try:
118 server = smtplib.SMTP(self.mailServerEdit.text(), 118 server = smtplib.SMTP(self.mailServerEdit.text(),
119 self.portSpin.value(), 119 self.portSpin.value(),
120 "", 10) 120 "", 10)
121 if self.useTlsCheckBox.isChecked(): 121 if self.useTlsCheckBox.isChecked():
122 server.starttls() 122 server.starttls()
123 try: 123 try:
124 server.login(self.mailUserEdit.text(), 124 server.login(self.mailUserEdit.text(),
155 E5MessageBox.critical(self, 155 E5MessageBox.critical(self,
156 self.trUtf8("Login Test"), 156 self.trUtf8("Login Test"),
157 self.trUtf8("""<p>The login test failed.<br>Reason: {0}</p>""") 157 self.trUtf8("""<p>The login test failed.<br>Reason: {0}</p>""")
158 .format(errorStr)) 158 .format(errorStr))
159 159
160
160 def create(dlg): 161 def create(dlg):
161 """ 162 """
162 Module function to create the configuration page. 163 Module function to create the configuration page.
163 164
164 @param dlg reference to the configuration dialog 165 @param dlg reference to the configuration dialog

eric ide

mercurial