FW: two small issues with php mail

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 

 

   _____  

From: Brad [mailto:brads@xxxxxxxxx] 
Sent: Monday, November 19, 2007 8:26 PM
To: 'David Giragosian'
Subject: RE:  two small issues with php mail

 

My original issue is trying to implement a Bcc and 

 

Emails are only making it to 50% of the recipients.

Research and past experience says that I need to implement smtp into my
code.

 

Testing of the present “parse free” code show that email addresses on the
same server: To: works Bcc: does not

 

Once Bcc: works on same server, I will need to test Bcc on another server
which I am sure requires the proper smtp configuration.

 

Working code:

 

<?

$email = $_REQUEST['email'];

$fromaddress = 'admin@xxxxxxxxxxxxxxxx';

$fromname = ‘ggggggggggggg'; $eol = "\r\n";

$smtp = "localhost";

$headers  = 'From: '.$fromname.' <'.$fromaddress.'>'.$eol;

$headers .= 'Bcc: webmaster@xxxxxxxxxxxxxxxx'; $eol = "\r\n";

$headers .= 'Reply-To: '.$fromname.' <'.$fromaddress.'>'.$eol;

$headers .= 'Return-Path: '.$fromname.' <'.$fromaddress.'>'.$eol;

$headers .= 'X-Mailer: PHP '.phpversion().$eol;

$headers .= 'Content-Type: text/html; charset=iso-8859-1'.$eol;

$headers .= 'Content-Transfer-Encoding: 8bit';

$subject = 'Your free book!';

$body = '<a
href="http://www.xxxxxxxxxxxxxxxx.com/freePDF/autopilotebook.pdf";>"Click
ME"</a>  Here is your FREE autopilot book!!!!';

mail($email, $subject, $body, $headers);

?>

 

   _____  

From: David Giragosian [mailto:dgiragosian@xxxxxxxxx] 
Sent: Monday, November 19, 2007 7:25 PM
To: Brad
Cc: php-general@xxxxxxxxxxxxx
Subject: Re:  two small issues with php mail

 

 

On 11/19/07, Philip Thompson <HYPERLINK
"mailto:philthathril@xxxxxxxxx"philthathril@xxxxxxxxx> wrote: 

On Nov 19, 2007 5:52 PM, Brad <HYPERLINK
"mailto:brads@xxxxxxxxx"brads@xxxxxxxxx> wrote:

> Why are you being to belligerent? 
> English 101-104 I have aced.
> Top secret security clearance I maintain.
> Concatenate I know well (why would I combine the from, and the bcc?)


I will refrain from the rest of the posts/slams and stick to your question 
in the (...).

"From" and "Bcc" are *BOTH* part of the headers - that's why you want to
concatenate them. By not using the . (dot), you are over-writing the "From"
line.

Bad/Pointless assignment:
$headers = "From: ...";
$headers = "Bcc: ...";

Good/Useful assignment:
$headers = "From: ...";
$headers .= "Bcc: ...";

Good luck. 
~Philip

 

Brad, 

 

If Philip's suggestion doesn't fix the problem, please post the relevant
code, again. 

 

I've lost track of your original question.   

 

David
 

 

No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM


No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM



No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux