Hi Chris,
Thanks for the response. However I have coded the Email code with SMTP
authentication. But the problem is my mail is going to the SPAM not in the
inbox. I remember someone has said that if the code is sending the email and
if its going under SPAM folder then the code is correct but I have to work
on client filter. I don't know how? Can you or anyone help me in this.
Here is the code:
<?PHP
/* Setup your Subject and Message Body */
$subject='Testing PHP Email';
$body='Hi the is nagendra prasd.';
/* Specify your SMTP Server, Port and Valid From Address */
ini_set("SMTP","mail.localroot.200u.com");
ini_set("smtp_port","465");
ini_set("sendmail_from","[email protected]");
/* Additional Headers */
$headers = "Cc:Real CC Name <[email protected]>\r\n";
/* Try to send message and respond if it sends or fails. */
if(mail ('ToPersonsName <[email protected]>', $subject, $body,
$headers )){
echo "<h2>Your Message was sent!</h2>";
}
else{
echo "<font color='red'><h2>Your Message Was Not Sent!</h2></font>";
}
exit;
?>