How to send automatic emials in python

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • giri123
    New Member
    • Sep 2011
    • 1

    How to send automatic emials in python

    HI,

    Can anybody tell me how to send the emails automatically in pyhton?

    Thanks,
    Giri
  • bvdet
    Recognized Expert Specialist
    • Oct 2006
    • 2851

    #2
    Giri,

    Your question is too vague. Can you clarify what you want to do and show us the code you have tried? Sending an email is fairly simple:
    Code:
    import smtplib
    sobj=smtplib.SMTP("smtp.xyz.net")
    sobj.login("abc@xyz.net", "password")
    sender="abc@xyz.net"
    rec="zzz@xxx.com"
    msg="""From: abc@xyz.net
    Subject: SMPT test
    Text"""
    sobj.sendmail(sender,rec,msg)
    sobj.quit()

    Comment

    Working...