Rahul S. Johari wrote:
Ave,
Iıve written a simple script to send a mail out in HTML format to the
recipient. Everything is working fine... Except the ³From² header. The
recipient receives the email from ³World Wide Web Server <[EMAIL PROTECTED]>²
instead of what I have specified. Hereıs my code...
<FORM action="<?php echo $PHP_SELF; ?>" method="post" name="one"><TEXTAREA
name="desc" cols="20" rows="5"></TEXTAREA><INPUT name="Submit" type="submit"
value="Submit"></FORM>
<?
if($Submit) {
$to = "[EMAIL PROTECTED]";
$subject = "SOMETHING : File Upload Notification";
$message = "
<html><head></head>
<body>
Hi,
<br><br>
You have recieved a new file in the Something File Manager, with the
following details:
<br><br>
Name: One<br>
Size: 94685 Bytes<br>
Description: $desc<br>
Date: $now
<br><br>
Please visit <b>SOMETHING File Manager</a></b> to login to your account and
download the file.<br>
This is an automated notification email. Please do not reply to this email.
<br><br>
Regards,<br>
SOMETHING<br>
</body></html>
";
$message = stripslashes($message);
mail($to,$subject,$message,'Content-type: text/html; charset=iso-8859-1;
From: SOMETHING <[EMAIL PROTECTED]>; Reply-To: [EMAIL PROTECTED];
MIME-Version: 1.0; X-Mailer: PHP/' . phpversion());
echo "It is done";
}
?>
Those should not be separated by semicolons (;) , you should use \r\n. So...
mail($to,$subject,$message,"Content-type: text/html\r\ncharset=iso-8859-1\r\nFrom:
SOMETHING <[EMAIL PROTECTED]>\r\nReply-To: [EMAIL PROTECTED]: 1.0\r\nX-Mailer: PHP/"
. phpversion());
echo "It is done";
... I donıt know what Iım doing wrong, itıs not reading the FROM or Reply-TO
in the headers. Instead of the mail stating ³Something
<[EMAIL PROTECTED]>² at the recipientıs end, it is stating ³World Wide
Web Server <[EMAIL PROTECTED]>² .. I have no clue why.
Thanks,
Rahul S. Johari
Coordinator, Internet & Administration
Informed Marketing Services Inc.
251 River Street
Troy, NY 12180
Tel: (518) 266-0909 x154
Fax: (518) 266-0909
Email: [EMAIL PROTECTED]
http://www.informed-sources.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php