Forum Moderators: coopster

Message Too Old, No Replies

mail() sending double e-mails...

Why?

         

mipapage

12:28 pm on Apr 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hey all,
I have the following function setup to submit some form data to a client and to myself. It works, however it sends two copies of the e-mail to each of us.

Note that I'm using simply '\n' after the headers as '\r\n' was printing the headers in the body of the e-mail rather than apply the header.
$subject = stripslashes($subject); 
$destemail = "client@client.co.uk";
$headers = "Cc: me@mydomain.com\n";
$headers .= "From: $_POST[email]\n";
$headers .= "Reply-To: $_POST[email]\n";
mail($destemail, $subject, $message, $headers);

The headers on the recieved message read:

From: posted-email 
Return-Path: posted-email
To: client@client.co.uk
Cc: me@mydomain.com

Any Suggestions?

jatar_k

9:13 pm on Apr 16, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



is there a loop or anything surrounding it?

There is nothing wrong with the code posted.