admin管理员组文章数量:1133738
I am trying to connect to an exchange email server to use SendSmtpEmail when an error is happening in spidermon.
I have verified that in settings.py of the scrapy project are correct
SPIDERMON_ENABLED = True
SPIDERMON_MAX_ERRORS = 1
SPIDERMON_EMAIL_SENDER = 'myemail'
SPIDERMON_EMAIL_TO = 'myemail'
SPIDERMON_EMAIL_SUBJECT = 'subject'
SPIDERMON_SMTP_HOST = 'smtp.office365'
SPIDERMON_SMTP_PORT = 587
SPIDERMON_SMTP_USER = 'myemail'
SPIDERMON_SMTP_PASSWORD = 'mypass'
SPIDERMON_SMTP_ENFORCE_TLS = True
SPIDERMON_SMTP_ENFORCE_SSL = False
monitors.py
class MyMonitorSuite(MonitorSuite):
monitors = [
ErrorCountMonitor,
]
monitors_failed_actions = [
SendSmtpEmail
]
but I am still getting an error.
Failure: twisted.mail._except.SMTPConnectError: Unable to connect to server
How to troubleshoot and fix this? and i have tested connecting and sending an email with smtplib in the same machine, works fine
本文标签: pythonIssue with using SendSmtpEmail of spidermonStack Overflow
版权声明:本文标题:python - Issue with using SendSmtpEmail of spidermon - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736742398a1950582.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论