Code: Select all
$mailTo = "$To";
$tafriend_to_name .= ",";
$mailSubject = "$tafriend_subject";
$mailBody .= "Dear $tafriend_to_name\n\n";
$mailBody .= "You friend, $tafriend_from_name has sent you an invitation to visit http://www.thankyoumahathir.com.my, with the Personal Message below:\n\n";
$mailBody .= "$tafriend_personal_message\n\n";
$mailBody .= "Best Regards,\n";
$mailBody .= "2mediastudio Management and Web Development Team\n";
$mailHeaders = "From: $tafriend_from_name";
mail($mailTo, $mailSubject, $mailBody, $mailHeaders);Code: Select all
tag added][/size]
i used the above coding for sending the email, but it seem to be like only works for the sending to the mailbox that hosted within the same server or same mail server only.
but this code couldn't send the email when the $mailTo is send to outsider like yahoo or hotmail.
After i have check with our hosting provider they told us that
"
The script tafriend.php is trying to use php's mail() function to send mail (using /usr/bin/sendmail), however with Apache running in a chrooted encvironment, from the web tafriend.php cannot access /usr/bin. The main directory (/) as Apache/tafriend.php sees it is actually /home/mydomain/public_html.
I would suggest using a function other than sendmail (perhaps create a socket to port 25 of 127.0.0.1 and send the mail manually), or follow suggestions from http://us4.php.net/manual/en/ref.mail.php. I strongly suggest reading the post by "grey at greywyvern dot com" or "hzmz at bofh dot auca dot kg".
I'm not so familiar with Linux yet.
Hey dude, plz help me on these, i'm kinda new and now got a deadline to meet.........
Thanks alot in advance....................