473,324 Members | 2,541 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

what is wrong with this mail script

$msubject = "Price Change";
$tomail = "yoelg...@yahoo.com";
$mfrom = "From: Baltimore Trails <i...@baltimoretrails.com>\r\n";
$mbody = "text....asdfasdfasdfasdfasdfa*sdf";
$bcchead1 = "Bcc: i...@baltimoretrails.com\r\n";
$bcchead2 = "Bcc: yoelg...@baltimoretrails.com\r\n";
$header = "$mfrom $bcchead1 $bcchead2";
mail($tomail, $msubject, $mbody, $header);
-------------------------------------------------------

this is what yoelg...@baltimoretrails.com email looks like:
the From field in MS outlook = "Baltimore Trails Bcc:
yoelg...@baltimoretrails.com"
and the To: field = "yoelg...@yahoo.com"
how do I make that the email in the bcc field should not see the To
field, they should see there email in the to field?
and why is the from field the way it is?
As far as the email for yoelg...@yahoo.com everything seems to be fine
with that

Aug 31 '05 #1
4 1341
"yo******@yahoo.com" <yo******@yahoo.com> wrote in
news:11**********************@g14g2000cwa.googlegr oups.com (in part):
$msubject = "Price Change";
$tomail = "yoelg...@yahoo.com";
$mfrom = "From: Baltimore Trails <i...@baltimoretrails.com>\r\n";
$mbody = "text....asdfasdfasdfasdfasdfa*sdf";
$bcchead1 = "Bcc: i...@baltimoretrails.com\r\n";
$bcchead2 = "Bcc: yoelg...@baltimoretrails.com\r\n";
$header = "$mfrom $bcchead1 $bcchead2";
mail($tomail, $msubject, $mbody, $header);
-------------------------------------------------------

this is what yoelg...@baltimoretrails.com email looks like:
the From field in MS outlook = "Baltimore Trails Bcc:
yoelg...@baltimoretrails.com"
and the To: field = "yoelg...@yahoo.com"


Try this instead:

msubject = 'Price Change';
$tomail = 'yoelg...@yahoo.com';
$mfrom = 'From: Baltimore Trails <i...@baltimoretrails.com>'."\r\n";
$mbody = "text....asdfasdfasdfasdfasdfa*sdf";
$header = $mfrom;
$header .= 'Bcc: i...@baltimoretrails.com';
$header .= ',yoelg...@baltimoretrails.com'."\r\n";

Your original way of creating the header put spaces in the string which
probably messed up the email headers. Also, the addresses in the BCC
header should be separated with commas.

Ken
Aug 31 '05 #2
*** yo******@yahoo.com wrote/escribió (31 Aug 2005 14:18:55 -0700):
$mfrom = "From: Baltimore Trails <i...@baltimoretrails.com>\r\n";
$mbody = "text....asdfasdfasdfasdfasdfa*sdf";
$bcchead1 = "Bcc: i...@baltimoretrails.com\r\n";
$bcchead2 = "Bcc: yoelg...@baltimoretrails.com\r\n";
$header = "$mfrom $bcchead1 $bcchead2";


This code creates these headers:

From: Baltimore Trails <i...@baltimoretrails.com>
Bcc: i...@baltimoretrails.com
Bcc: yoelg...@baltimoretrails.com

If first char in line is a white space, mail server will think it's not a
new header but the previous one continued. Remove unwanted spaces.
--
-- Álvaro G. Vicario - Burgos, Spain
-- http://bits.demogracia.com - Mi sitio sobre programación web
-- Don't e-mail me your questions, post them to the group
--
Sep 1 '05 #3
thank you Ken and Alvaro for your replys

another question. when i ran the script by typing the php file address
in to Internet Explorer, it only sent out like 56 out of about 68
emails. it came back with a 30 second time out error. sorry i dont
remember the exact error message. any idea what and how to correct this

thank you

Sep 13 '05 #4
On 13 Sep 2005 14:15:08 -0700, "yo******@yahoo.com" <yo******@yahoo.com> wrote:
another question. when i ran the script by typing the php file address
in to Internet Explorer, it only sent out like 56 out of about 68
emails. it came back with a 30 second time out error. sorry i dont
remember the exact error message. any idea what and how to correct this


Sent less in a batch, tune your mail server, or increase the PHP execution
time limit http://uk2.php.net/set_time_limit

--
Andy Hassall :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Sep 13 '05 #5

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

Similar topics

2
by: johnny | last post by:
hi all, I have a script to send newsletters both in html and text version, all works fine in email clients but unfortunately not in yahoo mail: it shows nothing in the body of the message,...
9
by: Jofio | last post by:
I am just learning PHP. I just tried coding a php script which I saved as mail.php ---------------------------- <? $name=$_POST; $email=$_POST; $comments=$_POST;
4
by: Andre | last post by:
Hi guys, newbie question. I am having trouble with a script that is supposed to login me to my account on yahoo pop server. When i do this: import getpass, poplib, re POPHOST =...
7
by: Tim Gaunt | last post by:
Hi, I'm hoping that someone will be able to help me with this one, I'm developing an application which basically inserts a load of data into the database ready for validation at a later date, I...
121
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode...
3
by: Andrew | last post by:
Hi, friends, I have a function which send email with attachments as the follows: public int SendEmailWithAttachment(string fromEmailAddress, string toEmailAddress, string subject, string...
5
by: Jim Mitchell | last post by:
I saw several posts asking for popups from web controls. The standard answer is that once rendered, the server no longer has control. I had some success with the following and I was curious if I...
9
by: happyse27 | last post by:
Hi All, In perl script(item b below) where we check if html registration form are filled in properly without blank with the necessary fields, how to prompt users that the field are incomplete...
5
by: Shalini Bhalla | last post by:
hi , A strange error is coming , when i run a php file , all the php and java script executes before submit only which actually should execute after clicking on submit button and...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.