我正在尝试使用 Scrapy 抓取后发送电子邮件,但出现此错误:
2017-02-25 12:44:44 [scrapy.mail] ERROR: Unable to send mail: To=['<my_email>@gmail.com'] Cc=['<my_email>@gmail.com'] Subject="Test" Attachs=0- Connection was refused by other side: 10061: No connection could be made because the target machine actively refused it..
这是代码:
mailer = scrapy.mail.MailSender.from_settings(scrapy.conf.settings)
mailer.send(to=["<my_email>@gmail.com"], subject="Test",
body="Test", cc=["<my_email>@gmail.com"])
如何使用 Scrapy 成功发送电子邮件MailSender()