Skip to content

New email/notify failing intermittantly #1751

@calisro

Description

@calisro

Reference:

https://discuss.flexget.com/t/new-email-notify-failing-intermittantly/3306

The issue here seems to be that when sending email the smtp connection is open/closed for each entry. This causes smtp throttling at a number of providers. Example:

2017-03-23 14:26 VERBOSE details test-Watchlist-LQ Summary - Accepted: 6 (Rejected: 0 Undecided: 0 Failed: 0)
2017-03-23 14:26 VERBOSE notify test-Watchlist-LQ Successfully sent a notification to email
2017-03-23 14:26 VERBOSE notify test-Watchlist-LQ Successfully sent a notification to email
2017-03-23 14:26 VERBOSE notify test-Watchlist-LQ Successfully sent a notification to email
2017-03-23 14:26 ERROR notify_entry test-Watchlist-LQ (534, '5.7.9 Please log in with your web browser and then try again. Learn more at\n5.7.9 https://support.google.com/mail/?p=WebLoginRequired p204sm2042179itp.19 - gsmtp')
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/notifiers/notify.py", line 103, in send_notification
send_notification(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/notifiers/notification_framework.py", line 117, in send_notification
notifier.notify(title, message, rendered_config) # TODO: Update notifiers for new api
File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/notifiers/email.py", line 143, in notify
text_to_native_str(config['smtp_password']))
File "/usr/lib/python2.7/smtplib.py", line 622, in login
raise SMTPAuthenticationError(code, resp)
SMTPAuthenticationError: (534, '5.7.9 Please log in with your web browser and then try again. Learn more at\n5.7.9 https://support.google.com/mail/?p=WebLoginRequired p204sm2042179itp.19 - gsmtp')
2017-03-23 14:26 VERBOSE notify test-Watchlist-LQ Successfully sent a notification to email
2017-03-23 14:26 VERBOSE notify test-Watchlist-LQ Successfully sent a notification to email
2017-03-23 14:26 VERBOSE list_add test-Watchlist-LQ adding accepted entries into movie_list - movie_low

We should attempt to keep the smtp connection open until at least the task is complete or longer so that multiple entries send multiple emails under 1 smtp connection.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions