Fix #1692289 [Clicking Test email without email specified](https://bugs.launchpad.net/calibre/+bug/1692289)

This commit is contained in:
Kovid Goyal 2017-05-26 22:40:48 +05:30
parent 24a70107c4
commit b09912da39
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -56,6 +56,10 @@ class TestEmail(QDialog):
l.addWidget(bb)
def start_test(self, *args):
if not self.to.text().strip():
return error_dialog(self, _('No email address'), _(
'No email address to send mail to has been specified. You'
' must specify a To: address before running the test.'), show=True)
self.log.setPlainText(_('Sending mail, please wait...'))
self.test_button.setEnabled(False)
t = Thread(target=self.run_test, name='TestEmailSending')