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","nagendra802...@gmail.com");

  /* Additional Headers */
  $headers = "Cc:Real CC Name <nagendra802...@gmail.com>\r\n";


  /* Try to send message and respond if it sends or fails. */
  if(mail ('ToPersonsName <nagendra802...@gmail.com>', $subject, $body,
$headers )){
      echo "<h2>Your Message was sent!</h2>";
  }
  else{
      echo "<font color='red'><h2>Your Message Was Not Sent!</h2></font>";
  }
  exit;
?>

Reply via email to