Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > smtplib question

Reply
Thread Tools

smtplib question

 
 
Garry Hodgson
Guest
Posts: n/a
 
      09-17-2003

how do i use smtplib to send mail to someone with "cc" to someone else?
if i just include the "to" addressees in the call to smtplib.sendmail(), and
put the others in the "Cc" header fields, only the "To" recipients get the mail,
thought the mail headers look right.

but if i also add the "Cc" folks to the list of recipients in the call to smtplib.sendmail(),
it arrives at their mailer with their address listed on both the "To" and "Cc"
header fields.

what i want is for everyone on the "To" or "Cc" list to get the mail, and for
the mail headers to reflect this.

please respond off-list. i had to give up following comp.lang.python for lack
of time.

thanks

----
Garry Hodgson, Technology Consultant, AT&T Labs

Be happy for this moment.
This moment is your life.

 
Reply With Quote
 
 
 
 
Garry Hodgson
Guest
Posts: n/a
 
      09-18-2003
Garry Hodgson wrote:
>
> how do i use smtplib to send mail to someone with "cc" to someone else?
> if i just include the "to" addressees in the call to smtplib.sendmail(), and
> put the others in the "Cc" header fields, only the "To" recipients get the mail,
> thought the mail headers look right.


oops. please ignore this. it was just a dumb mistake on my part.

--
Garry Hodgson Those who would give up essential
liberty
Senior Hacker to purchase a little temporary safety
Software Innovation Services deserve neither liberty nor safety.
AT&T Labs
http://www.velocityreviews.com/forums/(E-Mail Removed) - Benjamin Franklin, 1775
 
Reply With Quote
 
 
 
 
Tim Roberts
Guest
Posts: n/a
 
      09-19-2003
Garry Hodgson <(E-Mail Removed)> wrote:
>
>how do i use smtplib to send mail to someone with "cc" to someone else?
>if i just include the "to" addressees in the call to smtplib.sendmail(), and
>put the others in the "Cc" header fields, only the "To" recipients get the mail,
>thought the mail headers look right.


The e-mail headers (To:, Cc:, Subject:, etc.) are not part of SMTP. They
are ignored by sendmail and play no part at all in the e-mail delivery.
The only thing sendmail cares about is the list of addresses in the SMTP
protocol, which comes from the first parameter to smtplib.sendmail.

So, the short answer is that the address list (first parameter to
smtplib.sendmail) must include EVERYONE that should receive the message --
To, Cc, or Bcc -- in one big list. You can put whatever you want in the
headers in the body of the message; it won't matter. For large lists, it
is common for the header to say, for example:

To: recipient list suppressed

Perfectly legal.

>please respond off-list. i had to give up following comp.lang.python for lack
>of time.


But yet, you expect us to take OUR time to answer your questions for free?
That doesn't seem right.
--
- Tim Roberts, (E-Mail Removed)
Providenza & Boekelheide, Inc.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SMTPLIB] how to send a "Multiline" mail with smtplib? Evan Python 3 06-23-2008 08:50 AM
Re: smtplib question Tim Williams Python 1 01-17-2007 09:26 AM
question about smtplib nephish@xit.net Python 7 10-06-2005 03:36 AM
Question about smtplib, and mail servers in general. Chris Dewin Python 12 09-26-2005 04:38 PM
SMTPlib Emailing Attachments Bill Python 9 09-20-2003 10:26 AM



Advertisments