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.sendmai l(), 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.sendmai l(),
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.pytho n for lack
of time.
thanks
----
Garry Hodgson, Technology Consultant, AT&T Labs
Be happy for this moment.
This moment is your life. 2 4855
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.sendmai l(), 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 ga***@sage.att. com - Benjamin Franklin, 1775
Garry Hodgson <ga***@sage.att .com> 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.sendmai l(), 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.sendmai l.
So, the short answer is that the address list (first parameter to
smtplib.sendmai l) 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.pytho n 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, ti**@probo.com
Providenza & Boekelheide, Inc. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Bill |
last post by:
I am trying to have the capability to email attachments. Specifically
I want to be able to email a specific attachment that I name that may
be a PDF document, text doc, etc. I already have a working piece of
code that emails jpg attachments but does not work with any other
types of attachments. Could someone tell me how to modify this code to
send other types of attachments like the one's stated above(especially
PDF's)? Also how do I...
|
by: David Geller |
last post by:
Hi,
I had been using smptlib to send email via my covad relay previously (several months ago), and it worked fine. Covad requires authentication, and this was accomplished fine with smtp.login(usrname, pwd).
Today when I tried the program, it stopped working. Using the smtp debug option, I determined that when
send: 'AUTH PLAIN abcdef\r\n'
I would get the exception:
|
by: Tim Williams |
last post by:
I have a working SMTP client that I need to add TLS capability to, I
absolutely need the client to timeout within a specified time, but when I
use the sock.timeout() line it freezes the reading of chars from SSLFakeFile
used during TLS instead of timing out the client connection. I am
working from my own hacked version of smtplib, but can demonstrate the
problem using the standard module (Python 2.3.4). Can anyone suggest a...
|
by: Chris Dewin |
last post by:
Hi. I've been thinking about using smtplib to run a mailing list from my website.
s = smtplib.SMTP("server")
s.sendmail(fromaddress, toaddresess, msg)
I know that in this instance, the toaddresses variable can be a variable
of type list.
Suppose the list contains well over 100 emails. Would that create some
sort of drain on the mail server? Would I be better off doing it in some
|
by: nephish |
last post by:
Hey there,
i am using the smtplib module in python 2.3
my question is, this works:
server = smtplib.SMTP(localhost)
then server.sendmail(to address, from address, message)
| |
by: Van_Gogh |
last post by:
Hi,
I am learning how to use the smtplib module, but am having some very
early problems, maybe because I don't understand it.
So, am I correct that by following the example in the Python:
>>> import smtplib
>>> server = smtplib.SMTP('localhost')
>>> server.sendmail('soothsayer@example.org', 'jcaesar@example.org',
"""To: jcaesar@example.org
|
by: NicolasG |
last post by:
I'm using the following code to send e-mail through python:
import smtplib
fromaddr = 'myMail@gmail.com'
toaddrs = 'myOtherMail@gmail.com'
subject = 'someting for subject !'
msg = 'This is body of the mail.'
|
by: Roger |
last post by:
I am having a problem sending email through smtp.gmail.com using
smtplib. Everything works and the mail is sent and received, except
quit. The following shows the problem (without bothering to login or do
the sendmail):
I have not had this problem with other mail servers (but only tried
two). A solution for gmail seems to be to replace the server.quit()
with server.close(). The difference between the two commands is quit()
sends a...
|
by: zxo102 |
last post by:
Hi,
I am trying to use python module smtplib to send my email out on
window xp (localhost).
import smtplib
server = smtplib.SMTP('localhost')
but I got the error information as follows:
Traceback (most recent call last):
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |