problem with Mail function
| From: | Tariq Dalvi | Date: | Mon, 06 Feb 2006 02:55:39 +0000 |
| Subject: | problem with Mail function | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-229909@lists.php.net to get a copy of this message | ||
Hello everyone,
I m using php mail function it dose everyting fine besides it prints
message twise in the email body can someone please have a look
what i m doing wrong the code is as follows :
$to = "$email";
$subject = "someting goes here \n\n";
$headers = "From: admin@somewhere.com\n" .
"X-Mailer: Mailserver at somewhere.com\n" .
"Date: $date\n" .
"MIME-Version: 1.0\n" .
"Content-Type: text/plain; charset=ISO-8859-1\n" ;
message <<<EOF
...................
.......................
.........................
.....
...
EOF;
if (mail($to,$subject,$message,$headers)){
$say = "<p />E Mail sent successfully to $email. <br>";
}
else{
$say = "\n\n<p />Ohoho! Sending failed Please inform to Webmaster. <br>";
}
I shall highly appreciate any help
Thanks
Tariq