SMTP via GMAIL

Tim Roberts timr at probo.com
Tue Aug 5 00:18:30 EDT 2008


mmm <mdboldin at gmail.com> wrote:
>
>After reading about and using the smtplib module, I thought code such
>as below would ignore the 'Cc: ' body line below when sending messages
>and instead simply use the RECEIVERS list

Correct.  It is required by the SMTP spec to behave that way.

>But when using smtp.gmail.com as the server I learned that any
>@gmail.com address in the  Cc: text block would
>receive mail even if I changed the code to have the RECEIVERS list to
>ignore the CC addresses or not include the gmail address in the CC
>list as below

Interesting.  If true, that is incorrect behavior.

>And does anyone have a general routine that lets one also have Bcc:
>addresses usign SMTP?

To make a Bcc, all you do is include the address in the RECEIVERS list, but
don't mention it in the body at all.
-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the Python-list mailing list