Guest User

Untitled

a guest
Sep 20th, 2018
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. from scrapy import mail
  2.  
  3. mailer = mail.MailSender(smtphost='smtp-mail.outlook.com',
  4. mailfrom='someone@hotmail.com',
  5. smtpuser='someone@hotmail.com',
  6. smtppass='mypassword',
  7. smtpport=587,
  8. smtptls=True,
  9. )
  10.  
  11.  
  12. def send_mail(mail_sender):
  13. return mail_sender.send(to=["receiver@hotmail.com"],
  14. subject="Hello",
  15. body="Hello receiver",
  16. mimetype='text/plain')
  17.  
  18.  
  19. send_mail(mailer)
Add Comment
Please, Sign In to add comment