About Me

My photo
I am Raghuram Reddy, Adobe Certified Senior ColdFusion Developer (8yrs of exp.) working in Dubai, UAE. Contact me at: raghuramgreddy@gmail.com

Monday, June 7, 2010

Sending an email through gmail using Python

Hi Friends,

Started "hello, world" application last week. I am here to share n develop more n more interesting applications using Python.
Keep Rocking......
Here is the code


#Sending an email through gmail using Python - Raghuram Reddy
import smtplib
fromaddr = 'raghuramgreddy@gmail.com'
toaddrs = 'raghuramgreddy@gmail.com'
msg = 'Email message from PYTHON Raghuram app'

#provide gmail user name and password
username = 'gmailUserName'
password = 'gmailPassword'

# functions to send an email
server = smtplib.SMTP('smtp.gmail.com:587')
server.ehlo()
server.starttls()
server.ehlo()
server.login(username,password)
server.sendmail(fromaddr, toaddrs, msg)
server.quit()

Comming Soon.......Python::pyWinAuto control applications

2 comments:

  1. @Koti
    Brother.. i have changed email address in this. you will no more get emails if any body test this code....
    Thanks,
    Raghuram Reddy Gottimukkula

    ReplyDelete
  2. With Yahoo mail administrations being utilized far and wide, clients spread the world over, there's certain to be some specialized issues.https://www.buzzfeed.com/jiprinojit/gmail-support-services-to-resolve-2hmtt

    ReplyDelete