I am trying to send email after scraping using Scrapy, but I get this error:
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..
This is the code:
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"])
How can I send email successfully using Scrapy MailSender()