prismctg
February 13th, 2012, 03:30 PM
import smtplib
# Credentials
username = input("Enter your Gmail id : ")
password = input("Enter your Gmail password : ")
#from and to
fromaddr = username + "@gmail.com"
toaddr = input ("Type your destination email address: ")
msg = input("Type your message: ")
# The actual mail send
server = smtplib.SMTP('smtp.gmail.com:587')
server.starttls()
server.login(username,password)
server.sendmail(fromaddr,toaddr, msg)
server.quit()
# Credentials
username = input("Enter your Gmail id : ")
password = input("Enter your Gmail password : ")
#from and to
fromaddr = username + "@gmail.com"
toaddr = input ("Type your destination email address: ")
msg = input("Type your message: ")
# The actual mail send
server = smtplib.SMTP('smtp.gmail.com:587')
server.starttls()
server.login(username,password)
server.sendmail(fromaddr,toaddr, msg)
server.quit()