Advertisement
Guest User

Untitled

a guest
Apr 3rd, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. # Import smtplib for the actual sending function
  2. import smtplib
  3.  
  4. # Import the email modules we'll need
  5. from email.mime.text import MIMEText
  6.  
  7. # Open a plain text file for reading. For this example, assume that
  8. # the text file contains only ASCII characters.
  9. msg = MIMEText("Test effettuato {}'.format(now())")
  10.  
  11. # me == the sender's email address
  12. # you == the recipient's email address
  13. msg['Subject'] = 'Mail di test dal sistema di lettura targhe'
  14.  
  15. recipient_list = ["colombini.luca010@gmail.com", "paolo.cucchi@gmail.com"]
  16.  
  17.  
  18. # Send the message via our own SMTP server, but don't include the
  19. # envelope header.
  20. s = smtplib.SMTP('80.88.173.234', port=25)
  21.  
  22. # identify ourselves, prompting server for supported features
  23. s.ehlo()
  24. s.login(user="telecamere@curtatone.it", password="kfnvrt93")
  25. s.sendmail(from_addr=msg["from"], to_addrs=recipient_list, msg=msg.as_string())
  26. s.quit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement