Hi,
Does the email report support google smtp? I'm using the latest version on my Mac. In the urlwatch.yaml I'd the following setting where i'd added user and password:
email:
enabled: true
from: ''
html: false
method: smtp
sendmail:
path: sendmail
smtp:
host: smtp.gmail.com
user: [email protected]
password: mypassword
keyring: true
port: 465
starttls: true
however on running urlwatch I get the following error:
urlwatch 2.7, Copyright 2008-2016 Thomas Perl
Website: http://thp.io/2008/urlwatch/
watched 1 URLs in 0 seconds
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/bin/urlwatch", line 106, in
urlwatch_command.run()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urlwatch/command.py", line 167, in run
self.urlwatcher.close()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urlwatch/main.py", line 96, in close
self.report.finish()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urlwatch/handler.py", line 128, in finish
ReporterBase.submit_all(self, self.job_states, duration)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urlwatch/reporters.py", line 92, in submit_all
subclass(report, cfg, job_states, duration).submit()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urlwatch/reporters.py", line 366, in submit
mailer.send(msg)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urlwatch/mailer.py", line 83, in send
s = smtplib.SMTP(self.smtp_server, self.smtp_port)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/smtplib.py", line 251, in init
(code, msg) = self.connect(host, port)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/smtplib.py", line 338, in connect
(code, msg) = self.getreply()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/smtplib.py", line 394, in getreply
raise SMTPServerDisconnected("Connection unexpectedly closed")
smtplib.SMTPServerDisconnected: Connection unexpectedly closed
Thanks,
Brian
I also struggled with configuring email notifications and was able to solve the problem using the example/instructions posted in response to a different but related issue (found here: https://github.com/thp/urlwatch/issues/158 ).
Perhaps give that a try and see if it solves the problem.
Documented now (see README.md).
Jun 03
'18 12:06
thp
It would be great to add urlwatch --test-smtp feature to check if it is working correctly.