473,699 Members | 2,273 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 2117
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
1999
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
1983
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 what line I'm on, where I am in that line, or what I just deleted. It would do this in a normal...
1
1665
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
2076
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
1275
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
2782
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 returns 0L for the file size values and correct values for other elements such as parentDirID:
3
1437
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 formatted to java.lang.String.
14
4424
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: template <typename Tstruct mergesort_thread { T* start;
8
4977
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 happen on a button click event, and the name of the 'carbon-copy' table can be something other than...
0
8631
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9199
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9055
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7787
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6550
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4641
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3075
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
2
2366
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2016
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.