@calisro wrote:
With the new notify / email plugin we can specify to run the notify at the entry or the task level. If we select the entry level, we see multiple emails per task which is totally expected and what we want. The plugin, however, seems to do multiple logons/logoffs for each entry into the mail servers. This causes messages to fail because most email providers throttle the logon/logoff and the simultaneous connections.
This is an example of the intermittent errors. The error message is an authentication failure but it is really a throttling problem.
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
2017-03-23 14:26 VERBOSE notify test-Watchlist-LQ Successfully sent a notification to
2017-03-23 14:26 VERBOSE notify test-Watchlist-LQ Successfully sent a notification to
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
2017-03-23 14:26 VERBOSE notify test-Watchlist-LQ Successfully sent a notification to
2017-03-23 14:26 VERBOSE list_add test-Watchlist-LQ adding accepted entries into movie_list - movie_lowi've done some testing with the python code and if the connection isn't closed and if we reuse that connection for the larger batches of emails, then we will be far less likely to hit throttling limits. My suggestion would be that within a task we open one connection and then close it after the task EVEN if 'entries' are selected. Once the connection is open, we can send multiple messages for each entry.
Posts: 2
Participants: 2