By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,627 Members | 1,211 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,627 IT Pros & Developers. It's quick & easy.

How to send automatic emials in python

P: 1
HI,

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

Thanks,
Giri
Oct 3 '11 #1
Share this Question
Share on Google+
1 Reply


bvdet
Expert Mod 2.5K+
P: 2,851
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:
Expand|Select|Wrap|Line Numbers
  1. import smtplib
  2. sobj=smtplib.SMTP("smtp.xyz.net")
  3. sobj.login("abc@xyz.net", "password")
  4. sender="abc@xyz.net"
  5. rec="zzz@xxx.com"
  6. msg="""From: abc@xyz.net
  7. Subject: SMPT test
  8. Text"""
  9. sobj.sendmail(sender,rec,msg)
  10. sobj.quit()
Oct 3 '11 #2

Post your reply

Sign in to post your reply or Sign up for a free account.