import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from email.mime.base import MIMEBase from email import encoders
username = "user@gmail.com" password = "passwd" mail_from = "user@gmail.com" mail_to = "to@mail.com;" mail_subject = "Test Subject" mail_body = "This is a test message" mail_attachment="1.png" mail_attachment2="2.png" mail_attachment_name="1.png" mail_attachment_name2="2.png"