Jump to content

one email is sent, but recipient is listed twice in the header


luckyass

Recommended Posts

a simple problem, which isn't really a problem...it just bugs me.

 

when i send with mail() function, the email is sent once but the "To:" line looks like this "To: [email protected]; Bill Jones", where Bill Jones properties is the email address [email protected]. why the redundancy? the "From" line looks like it should.

 

here is the code:

 

// To send HTML mail, the Content-type header must be set

$headers = 'MIME-Version: 1.0' . "\r\n";

$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

 

// Additional headers

$headers .= "To: $name <".$email.">" . "\r\n";            // get same result whether $email is concatenated or not

$headers .= "From: Best Messsenger <[email protected]>" . "\r\n";

 

// Mail it

mail($to, $subject, $message, $headers);

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.