123456789101112131415161718192021222324252627 |
- import smtplib
- import traceback
- import os
- from email.mime.text import MIMEText
- from email.mime.image import MIMEImage
- from email.mime.multipart import MIMEMultipart
- from email.message import EmailMessage
- import codecs
- gmail_user = 'ming@choozmo.com'
- gmail_password='lzpxinencaawsjus'
- sent_from = gmail_user
- #to = ['jared@choozmo.com','nina.huang@choozmo.com','ana@choozmo.com','ming@choozmo.com','mike@choozmo.com','andy@choozmo.com','hana@choozmo.com','stacy@choozmo.com','wen@choozmo.com','yukyo@choozmo.com','fxp87257@gmail.com','noodlesloves@gmail.com']
- to = ['ming013r@gmail.com']
- def send(msg):
- try:
- server = smtplib.SMTP_SSL('smtp.gmail.com', 465)
- server.ehlo()
- server.login(gmail_user, gmail_password)
- server.sendmail(sent_from, to, 'test mail')
- server.close()
- print ('Email sent!')
- except:
- traceback.print_exc()
- print ('Something went wrong...')
|