[Email-SIG] smtplib and getting a copy ?

Barry Warsaw barry at python.org
Thu Apr 13 19:58:59 CEST 2006


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.

-Barry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 309 bytes
Desc: This is a digitally signed message part
Url : http://mail.python.org/pipermail/email-sig/attachments/20060413/4b62c633/attachment.pgp 


More information about the Email-SIG mailing list