Subject with SMTPLIB?

Gerhard Häring gerhard.nospam at bigfoot.de
Tue Mar 13 14:14:20 EST 2001


Gregory Jorgensen wrote:
> 
> You need to add a subject header to your message. Email message format is
> simple: headers, blank line, message body.
> 
> import smtplib
> 
> msg = "subject: hello, world!\n\nmessage body"
> 
> s = smtplib.SMTP(host)
> s.sendmail(fromaddr, toaddrs, msg)
> 
> You'll find a good SMTP quick reference on Dan Bernstein's site (he's the author
> of qmail). See http://cr.yp.to/immhf.html.
> 
> In article <3AADE48A.5D8AA43 at daimlerchrysler.com>, root says...
> [...]

And, btw. you don't need to be root on a mission critical mailserver to
use it ;-)

Gerhard
-- 
Sorry for the fake email, please use the real one below to reply.
contact: g e r h a r d @ b i g f o o t . d e
web:     http://highqualdev.com



More information about the Python-list mailing list