[Tutor] smtplib howto send with a subject line

Daniel McQuay simplebob at gmail.com
Thu May 24 03:39:44 CEST 2007


Thanks a lot Mike you have been very helpful. I gave that a try in a few
different ways but, with the same results. I'm going to try your first
example.

Best Regards,

On 5/23/07, Mike Hansen <Mike.Hansen at atmel.com> wrote:
>
>
>
> > -----Original Message-----
> > From: tutor-bounces at python.org
> > [mailto:tutor-bounces at python.org] On Behalf Of Daniel McQuay
> > Sent: Wednesday, May 23, 2007 3:52 PM
> > Cc: tutor at python.org
> > Subject: Re: [Tutor] smtplib howto send with a subject line
> >
> > Thanks Mike, it seems that I'll be easy to incorporate that
> > into my script as well.
> >
> > I'll give it a try. I'm still open to other suggestions, though.
> >
>
> Take a look at this link again(I think you said you looked at it.)
>
> http://effbot.org/librarybook/smtplib.htm
>
> Notice that the body string has From:, To:, Subject: followed by the
> from, to, and subject.
>
> body = string.join((
>     "From: %s" % FROM,
>     "To: %s" % TO,
>     "Subject: %s" % SUBJECT,
>     "",
>     BODY), "\r\n")
>
> You might need to do something similar to get your subject line although
> without the string module since the string methods are built in.
>
> I'm no expert on how to construct e-mail messages, so take this with a
> grain of salt. I'm but a simple caveman programmer(*).
>
> Mike
>
> * - Phil Hartman "I'm but a simple caveman lawyer" SNL
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>



-- 
Daniel McQuay
Jaluno.com
H: 814.825.0847
M: 814-341-9013
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070523/c278b32b/attachment.html 


More information about the Tutor mailing list