Hey
I've got a nice email sending script that works a charm - except any email sent is sent twice, despite there only being a single call to the mail() function. It's a simple script, no loops that could have cause it to be called twice. Infact, it's a problem I'm having on two different scripts.
Is there some horrible secret about mail() I should be aware of? Or does my server have a double-email complex?
The actual code is:
$recipient = 'contact@domain.com';
$message = 'A message.';
$message = wordwrap($message, 70);
// Define Header
$headers .= 'To: My Dear Friend <'. $recipient .'>' . "\r\n";
$headers .= 'From: My Dear Self <NOREPLY>' . "\r\n";
// Send
mail($recipient, $subject, $message, $headers);
(OK, so it's not the actual code, but for all intents and purposes it is)