473,909 Members | 2,176 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 2135
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
2007
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
1997
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
1670
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
2088
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
1281
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
2795
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
1443
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
4449
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
4990
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
10037
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11348
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
10921
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...
1
11052
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9727
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...
0
7249
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();...
0
5938
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...
2
4336
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3359
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.