[Tutor] How to send an email using Python

2009-03-10 Thread Samuel Avinash
Hi, Can anybody tell me how to send an email to a recipient using PythonI am trying to send an email using GmailI create an instance of  smtplib and use :x=smtplib.SMTP(sever,port) and then x.login(user,pwd)I try to send the email usingx..sendmail(SENDER, RECIPIENTS, msg)But I get the following

Re: [Tutor] Tutor Digest, Vol 61, Issue 42

2009-03-11 Thread Samuel Avinash
nce of ?smtplib and use : > x=smtplib.SMTP(sever,port) > and then > x.login(user,pwd) > I try to send the email using > x..sendmail(SENDER, RECIPIENTS, msg) > But I get the following error > Traceback (most recent call last): > File "C:UsersAvisDesktopMail.py",

Re: [Tutor] How to send an email using Python

2009-03-11 Thread Samuel Avinash
sconnected("Connection unexpectedly closed") smtplib.SMTPServerDisconnected: Connection unexpectedly closedTool completed with exit code 1ThanksAvi nash Original message From:Senthil Kumaran< orsent...@gmail.com >Date: 11 Mar 09 09:58:53Subject:Re: [Tutor] How to send an email usi

Re: [Tutor] How to send an email using Python

2009-03-11 Thread Samuel Avinash
Hey Stefan,Thanks for your response.My script is similar to yours, but as you've pointed that it could be temporary. I've been retrying to connect and send email but in vain. Here's the snippet of my code. Can you debug and help me what could really have gone wrong. import smtplib import base6