Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from scrapy import mail
- mailer = mail.MailSender(smtphost='smtp-mail.outlook.com',
- mailfrom='someone@hotmail.com',
- smtpuser='someone@hotmail.com',
- smtppass='mypassword',
- smtpport=587,
- smtptls=True,
- )
- def send_mail(mail_sender):
- return mail_sender.send(to=["receiver@hotmail.com"],
- subject="Hello",
- body="Hello receiver",
- mimetype='text/plain')
- send_mail(mailer)
Add Comment
Please, Sign In to add comment