[Tutor] SMTP Mail

François Granger francois.granger@free.fr
Wed, 16 Oct 2002 18:50:56 +0200


on 16/10/02 16:27, James.Rocks@equant.com at James.Rocks@equant.com wrote:

> OK ... I'm trying to make SMTP Mail work (module smtplib) and, well, it
> does ... sort of.
> 
> This is the program I'm using to test it:
> 
>     import smtplib
> 
>     sToAddress = "james.rocks@equant.com"
>     sFromAddress = "james.rocks@equant.com"
>     sMessage = "Test Message"
> 
>     sSMTPServer = smtplib.SMTP(<SMTPSERVER>)
>     sSMTPServer.set_debuglevel(1)
>     sSMTPServer.sendmail(sFromAddress, sToAddress, sMessage)
>     sSMTPServer.quit()

To create the mail message itself (your sMessage variable), use either the
RFC822 lib or the new email lib.......

-- 
Le courrier est un moyen de communication. Les gens devraient
se poser des questions sur les implications politiques des choix (ou non
choix) de leurs outils et technologies. Pour des courriers propres :
<http://marc.herbert.free.fr/mail/> -- <http://minilien.com/?IXZneLoID0>