473,545 Members | 721 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Blind carbon copy

I am running into a strange problem with blind carbon copy. I specify two
addresses, one for the sendto and one for the bcc (both are mine). It
sends two emails, but BOTH are to the sendto address. Here it is:

$from = "me@third.c om";
$subject = "testing";
$message = "A set of text";
$sendTo = "me@first.c om";
$bcc = "me@second.com" ;
$message = wordwrap($messa ge, 70);
$headers = 'From: ' . $from . "\r\n" . 'Reply-To: ' . $from . "\r\n";
$headers .= 'Bcc: ' . $bcc . "\r\n";
$headers .= 'X-Mailer: PHP/' . phpversion();
mail($sendTo, $subject, $message, $headers);
I get two emails at me@first.com. If I switch the two addresses (setting
$sendTo to be me@second.com and $bcc to be me@first.com, then I get two
emails at me@second.com.

What is going on here?

Shelly
Oct 27 '06 #1
5 2106
Shelly wrote:
I am running into a strange problem with blind carbon copy. I specify two
addresses, one for the sendto and one for the bcc (both are mine). It
sends two emails, but BOTH are to the sendto address. Here it is:

$from = "me@third.c om";
$subject = "testing";
$message = "A set of text";
$sendTo = "me@first.c om";
$bcc = "me@second.com" ;
$message = wordwrap($messa ge, 70);
$headers = 'From: ' . $from . "\r\n" . 'Reply-To: ' . $from . "\r\n";
$headers .= 'Bcc: ' . $bcc . "\r\n";
$headers .= 'X-Mailer: PHP/' . phpversion();
mail($sendTo, $subject, $message, $headers);
I get two emails at me@first.com. If I switch the two addresses (setting
$sendTo to be me@second.com and $bcc to be me@first.com, then I get two
emails at me@second.com.

What is going on here?

Shelly

I think you'll find this is working, just that the bcc address is
correctly not being displayed. If you look at the headers for the
received emails, you should see they have gone to the right addresses.
Oct 27 '06 #2

"Jeff Paffett" <jp******@otene t.grwrote in message
news:eh******** **@mouse.otenet .gr...
Shelly wrote:
>I am running into a strange problem with blind carbon copy. I specify
two addresses, one for the sendto and one for the bcc (both are mine).
It sends two emails, but BOTH are to the sendto address. Here it is:

$from = "me@third.c om";
$subject = "testing";
$message = "A set of text";
$sendTo = "me@first.c om";
$bcc = "me@second.com" ;
$message = wordwrap($messa ge, 70);
$headers = 'From: ' . $from . "\r\n" . 'Reply-To: ' . $from . "\r\n";
$headers .= 'Bcc: ' . $bcc . "\r\n";
$headers .= 'X-Mailer: PHP/' . phpversion();
mail($sendTo, $subject, $message, $headers);
I get two emails at me@first.com. If I switch the two addresses (setting
$sendTo to be me@second.com and $bcc to be me@first.com, then I get two
emails at me@second.com.

What is going on here?

Shelly

I think you'll find this is working, just that the bcc address is
correctly not being displayed. If you look at the headers for the received
emails, you should see they have gone to the right addresses.
The headers are for the two are virtually identical, but I think I see what
you mean. I am getting two, one by each route, but the "To:" displays the
same for both and the bcc doesn't show at all (as it shouldn't). This would
explain why I am getting two, and yet it appears as if both are being sent
to the same address. The only differences between the two headers is that
in one the addresses are all encased in brackets while in the other they are
not (see below)

To: <me@first.com >
Subject: new test
From: <se****@his.com >
Reply-To: <se****@his.com >
X-Mailer: PHP/5.1.2
Message-Id: <20************ ***********@euc lid.dreamhost.c om>
Date: Thu, 26 Oct 2006 18:56:29 -0700 (PDT)

To: me@first.com
Subject: new test
From: se****@his.com
Reply-To: se****@his.com
X-Mailer: PHP/5.1.2
Message-Id: <20************ ***********@euc lid.dreamhost.c om>
Date: Thu, 26 Oct 2006 18:56:29 -0700 (PDT)

Is that what you meant?

Shelly

Oct 27 '06 #3
On Fri, 27 Oct 2006 02:09:44 GMT, "Shelly"
<sh************ @asap-consult.comwrot e:
>I am running into a strange problem with blind carbon copy. I specify two
addresses, one for the sendto and one for the bcc (both are mine). It
sends two emails, but BOTH are to the sendto address.
If you mean that both emails have the same "To: " header, that's quite
normal. If you mean that both emails go to the same mailbox, and the
other mailbox does not receive a copy, that's not normal, but doesn't
appear to be the fault of your code.

hth

-
Remove mypants to email.
<http://www.shaunc.com/>
Oct 28 '06 #4
Shelly wrote:
"Jeff Paffett" <jp******@otene t.grwrote in message
news:eh******** **@mouse.otenet .gr...
>Shelly wrote:
>>I am running into a strange problem with blind carbon copy. I specify
two addresses, one for the sendto and one for the bcc (both are mine).
It sends two emails, but BOTH are to the sendto address. Here it is:

$from = "me@third.c om";
$subject = "testing";
$message = "A set of text";
$sendTo = "me@first.c om";
$bcc = "me@second.com" ;
$message = wordwrap($messa ge, 70);
$headers = 'From: ' . $from . "\r\n" . 'Reply-To: ' . $from . "\r\n";
$headers .= 'Bcc: ' . $bcc . "\r\n";
$headers .= 'X-Mailer: PHP/' . phpversion();
mail($sendTo, $subject, $message, $headers);
I get two emails at me@first.com. If I switch the two addresses (setting
$sendTo to be me@second.com and $bcc to be me@first.com, then I get two
emails at me@second.com.

What is going on here?

Shelly

I think you'll find this is working, just that the bcc address is
correctly not being displayed. If you look at the headers for the received
emails, you should see they have gone to the right addresses.

The headers are for the two are virtually identical, but I think I see what
you mean. I am getting two, one by each route, but the "To:" displays the
same for both and the bcc doesn't show at all (as it shouldn't). This would
explain why I am getting two, and yet it appears as if both are being sent
to the same address. The only differences between the two headers is that
in one the addresses are all encased in brackets while in the other they are
not (see below)

To: <me@first.com >
Subject: new test
From: <se****@his.com >
Reply-To: <se****@his.com >
X-Mailer: PHP/5.1.2
Message-Id: <20************ ***********@euc lid.dreamhost.c om>
Date: Thu, 26 Oct 2006 18:56:29 -0700 (PDT)

To: me@first.com
Subject: new test
From: se****@his.com
Reply-To: se****@his.com
X-Mailer: PHP/5.1.2
Message-Id: <20************ ***********@euc lid.dreamhost.c om>
Date: Thu, 26 Oct 2006 18:56:29 -0700 (PDT)

Is that what you meant?

Shelly
I don't think your email program is displaying the full headers, there's
a Delivered to: field in mine. But they will appear to be delivered to
the same address, yes.
Oct 29 '06 #5
Jeff Paffett <jp******@otene t.grwrote:
>
I don't think your email program is displaying the full headers, there's
a Delivered to: field in mine. But they will appear to be delivered to
the same address, yes.
"Delivered-To:" is a not a standard header. Your mail server is adding
that to help with spam filtering. Some mail servers call it something like
"X-Envelope-To:".
--
Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
Oct 29 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
1985
by: Hats | last post by:
Catholic Exorcism Failed Exorcism: The Blind Leading The Blind Subject: Re: Catholic Exorcisms Date: 1997/10/12 SEVERAL EXORCISMS
4
1974
by: Zachary | last post by:
Hello, I'm a blind non-programmer trying to learn Python. I've got python 2.3 for windows, but the problem is that Idle doesn't seem to work two well with my screen reading program. Is notepad, then, my only other real choice? Pythonwin worked similarly badly. The problem is my programs inability to track the cursor. It doesn't tell me...
1
1661
by: fortepianissimo | last post by:
This is a question only relevant to Mac OS X. Could someone offer a simple example how to use Carbon.File module (perhaps Alias.FSResolveAlias()?) to resolve an alias? Basically I'd like to load in an alias file and find out which file/directory the alias points to. Thanks a lot!
0
2071
by: Hats | last post by:
Catholic Exorcism Failed Exorcism: The Blind Leading The Blind Subject: Re: Catholic Exorcisms Date: 1997/10/12 SEVERAL EXORCISMS ---------------------------------------------------------------------------- ---- The Exorcism of Nicola Aubrey In the Year 1565 (from catholic.org)
0
1269
by: Ringo | last post by:
Catholic Exorcism Failed Exorcism: The Blind Leading The Blind Subject: Re: Catholic Exorcisms Date: 1997/10/12 SEVERAL EXORCISMS
2
2773
by: donbro | last post by:
If my read of the extension source (Mac/Modules/file/_Filemodule.c) is correct, the parameter sizes specified for data and resource file sizes are UInt32 where they should be UInt64. In both OS9 and OSX Carbon, the MacOS File Manager (Files.h) uses UInt64 values for data and resource filesizes. Testing Python 2.3 and 2.4.2 on MacOS 10.3...
3
1430
by: kitty | last post by:
Hi, Iam using the Carbon framework to read data from XML files, but it does not read values placed inside curly braces {}. Example: <output>{property}</output> I have tried using numeric character reference <output>&#x7B;property&#x7D;</output> but it still gives InvalidConfiguration Error. The stacktrace is: Value {property} cannot be...
14
4410
by: andreyvul | last post by:
g++ says a reinterpret cast from void* is disallowed; however, all I'm trying to do is de-capsulate a void* argument that holds the pointer to a class (and static_cast forces cast constructor) any solutions? also this pops up: 43: error: expected unqualified-id before 'return' code: includes: stdio.h, stdlib.h, time.h, pthread.h struct:...
8
4969
by: blakerrr | last post by:
Hi All, Is it possible to create a carbon-copy of a table using VBA? I have a table called 'Junction' that stores the structure of a machines assemblies and subassemblies, and I need to create a copy of this table, like a freeze-frame type of thing, about every 2 months in order to store the history of the machines contents. I need this to...
0
7465
marktang
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...
0
7656
Oralloy
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. ...
0
7805
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
5969
agi2029
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...
1
5325
isladogs
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...
0
4944
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...
0
3441
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1878
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
0
701
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.