Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Import smtplib for the actual sending function
- import smtplib
- # Import the email modules we'll need
- from email.mime.text import MIMEText
- # Open a plain text file for reading. For this example, assume that
- # the text file contains only ASCII characters.
- msg = MIMEText("Test effettuato {}'.format(now())")
- # me == the sender's email address
- # you == the recipient's email address
- msg['Subject'] = 'Mail di test dal sistema di lettura targhe'
- recipient_list = ["colombini.luca010@gmail.com", "paolo.cucchi@gmail.com"]
- # Send the message via our own SMTP server, but don't include the
- # envelope header.
- s = smtplib.SMTP('80.88.173.234', port=25)
- # identify ourselves, prompting server for supported features
- s.ehlo()
- s.login(user="telecamere@curtatone.it", password="kfnvrt93")
- s.sendmail(from_addr=msg["from"], to_addrs=recipient_list, msg=msg.as_string())
- s.quit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement