|
Posted by cchereTieShou on 04/05/05 21:39
I am using the mail() function to send a quite simple email but always
get warning message as "Notice: Array to string conversion" at this
line "if(mail($MailTo, $MailSubj, $MailCon,
$MailH,"-fbounce@myhost.com")){" in the following php code.
I don't see where is the Array at all. Appreciated for helps
<?php
error_reporting(E_ALL);
$FromName="tieshou";
$MailFrom="xxxxx@xxxxxxxxx.com";
$MailTo="XXXX@yahoo.com";
$MailSubj="This is just a test for sending out email purpose";
$MailCon="This is a somehting to test out";
$MailH = "MIME-Version: 1.0\r\n";
$MailH .= "From: $FromName <$MailFrom>\r\n";
$MailH .= "Reply-to: $FromName <$MailFrom>\r\n";
$MailH .= "X-Priority: 3\r\n";
$MailH .= "X-Mailer: PHP mailer\r\n";
if(mail($MailTo, $MailSubj, $MailCon, $MailH, "-fbounce@myhost.com")){
echo "sending out succeessfully";
}else{
echo "Can't send out for some reason.";
}
?>
Navigation:
[Reply to this message]
|