A python script to send e-mails with the gmail smtp sever.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
import smtplib smtpserver = 'smtp.gmail.com' AUTHREQUIRED = 1 # if you need to use SMTP AUTH set to 1 smtppass = 'password' # for SMTP AUTH, set SMTP password here mssg = "Test mail" s = mssg server = smtplib.SMTP_SSL(smtpserver,465) server.login(smtpuser,smtppass) server.set_debuglevel(1) server.sendmail(SENDER, [RECIPIENTS], s) server.quit() |
Leave a Reply