[Email-SIG] smtplib and getting a copy ?

Lukasz Szybalski szybalski at gmail.com
Thu Apr 13 20:15:34 CEST 2006


On 4/13/06, Barry Warsaw <barry at python.org> wrote:
> On Thu, 2006-04-13 at 12:47 -0500, Lukasz Szybalski wrote:
>
> > I am sending an email with smtplib, and i need to get a copy of what i
> > have sent out.
> > Is there a way to do it?
> >
> > I am storing the information into a database so I need to get message
> > id, time etc from the message that gets sent out.
>
> Do you want the mail server to send you a copy, or do you want a copy of
> what you send to the mail server?  If the former, just add a BCC header
> and include the return address you want the copy sent to.  If the
> latter, just do str(msg) to get the text.

Although that works to get what i created i also need to get :
Date: Thu, 13 Apr 2006 11:11:17 -0700 (PDT)
Message-Id: <443e9445.2a2d498e.545b.68b7SMTPIN_ADDED at mx.gmail.com>

Anyway to do it? Does smtplib have a way to return exact thing it is sending?

> -Barry
>
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2.2 (GNU/Linux)
>
> iQCVAwUARD6RY3EjvBPtnXfVAQIoFwP9HEayxK92vSYnsv4U9REibulopyFVS/PP
> s4NYOkSZdiFhzJvLa5ikLndtWsBlW+7WQcBHjAJQM/Lro15A0OPwwTz/GlMuyRBZ
> w3+oJYvA0usfXkyzf599mzWJeDMIVQEn5XI71bCr2A+4d81OdbbZR+B4dc2TyHxE
> kokXiQsLVMY=
> =UKfv
> -----END PGP SIGNATURE-----
>
>
>


--
Lukasz Szybalski
www.lucasmanual.com


More information about the Email-SIG mailing list