mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-08 11:03:38 +00:00
Merge pull request #602 from JackDandy/feature/ChangeEmailNotify
Change improve handling of a bad email notify setting.
This commit is contained in:
commit
3278c29cc6
2 changed files with 8 additions and 6 deletions
|
@ -107,6 +107,7 @@
|
||||||
* Change to simplify xem id fetching
|
* Change to simplify xem id fetching
|
||||||
* Fix issue on Add Existing Shows page where shows were listed that should not have been
|
* Fix issue on Add Existing Shows page where shows were listed that should not have been
|
||||||
* Change get_size helper to also handle files
|
* Change get_size helper to also handle files
|
||||||
|
* Change improve handling of a bad email notify setting
|
||||||
|
|
||||||
|
|
||||||
### 0.10.0 (2015-08-06 11:05:00 UTC)
|
### 0.10.0 (2015-08-06 11:05:00 UTC)
|
||||||
|
|
|
@ -176,10 +176,11 @@ class EmailNotifier:
|
||||||
def _sendmail(self, host, port, smtp_from, use_tls, user, pwd, to, msg, smtpDebug=False):
|
def _sendmail(self, host, port, smtp_from, use_tls, user, pwd, to, msg, smtpDebug=False):
|
||||||
logger.log('HOST: %s; PORT: %s; FROM: %s, TLS: %s, USER: %s, PWD: %s, TO: %s' % (
|
logger.log('HOST: %s; PORT: %s; FROM: %s, TLS: %s, USER: %s, PWD: %s, TO: %s' % (
|
||||||
host, port, smtp_from, use_tls, user, pwd, to), logger.DEBUG)
|
host, port, smtp_from, use_tls, user, pwd, to), logger.DEBUG)
|
||||||
|
|
||||||
|
try:
|
||||||
srv = smtplib.SMTP(host, int(port))
|
srv = smtplib.SMTP(host, int(port))
|
||||||
if smtpDebug:
|
if smtpDebug:
|
||||||
srv.set_debuglevel(1)
|
srv.set_debuglevel(1)
|
||||||
try:
|
|
||||||
if (use_tls == '1' or use_tls == True) or (len(user) > 0 and len(pwd) > 0):
|
if (use_tls == '1' or use_tls == True) or (len(user) > 0 and len(pwd) > 0):
|
||||||
srv.ehlo()
|
srv.ehlo()
|
||||||
logger.log('Sent initial EHLO command!', logger.DEBUG)
|
logger.log('Sent initial EHLO command!', logger.DEBUG)
|
||||||
|
|
Loading…
Reference in a new issue