I want to send mail to windows server using php but i am failed to sent mail. Please send the actual code for send mail using Windows server 2008...
$name=trim($_POST['name']);
$email=trim($_POST['email']);
$message=trim($_POST['textarea']);
ini_set("SMTP","gmail-smtp-in.l.google.com");
ini_set("smtp_port",25);
ini_set("sendmail_path","/usr/local/bin/sendmail");
ini_set("sendmail_from","$email");
$subject="One Request from ".$name;
$new_msz="My name is:- ".$name ." My Email Id:- ".$email ." Message:- ".$message;
$email_id="akwwwamit@gmail.com";
if(mail($email_id,$subject,$new_msz,$email))
{
$ms="Successfully sent";
$msz=base64_encode($ms);
header("Location:write-us.php?da=$msz");
}
else
{
$ms="Something problem try again";
$msz=base64_encode($ms);
header("Location:write-us.php?da=$msz");
}