Google Answers Logo
View Question
 
Q: Python + SMTP Client ( No Answer,   1 Comment )
Question  
Subject: Python + SMTP Client
Category: Computers
Asked by: fresh02-ga
List Price: $20.00
Posted: 25 Feb 2006 10:07 PST
Expires: 27 Mar 2006 10:07 PST
Question ID: 700861
Where can I find a complete tutorial or guide explaining how I can
create and send e-mail in Python?  In particular, I would like to have
a tutorial that has examples and shows someone how to connect to write
the necessary code using the Python IDLE so that they may send e-mail.
Answer  
There is no answer at this time.

Comments  
Subject: Re: Python + SMTP Client
From: rssohan-ga on 26 Feb 2006 12:13 PST
 
Current versions of python come with the "smtplib" module that allow
flexible manipulation and access to the SMTP protocol

1. The docs for the smtp module are here:
http://www.python.org/doc/2.4.2/lib/module-smtplib.html

2.A simple example would be something like:
server=smtplib.SMTP('destination.smtp.server')
server.sendmail("fromaddress","toaddress","message")

a more complete tutorial is found at:
http://www.python.org/doc/2.4.2/lib/SMTP-example.html

3. If you just want to send mail using the underlying sendmail command
and it's associated mechanism without directly connecting to the
destination server, you can invoke the sendmail program on unix:
take a look at:
http://www.yak.net/fqa/84.html

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy