My php mail function is only working for gmail...please tell me if you found any error...i need to send email in Hotmail and yahoo as well. $cemail = trim($_POST['cemail']);
php mail function
18
My php mail function is only working for gmail...please tell me if you found any error...i need to send email in Hotmail and yahoo as well.
$cemail = trim($_POST['cemail']);
$cname = trim($_POST['cname']);
$subject = "Contact Us";
$message .= "<table><tr><td>Name : </td><td>$cname</td></tr> <tr><td>Email : </td><td>$cemail</td></tr></table>";
$message .= trim($_POST['cmsg']);
$headers = "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\n";
$headers .= "From: $cname<$cemail>" . "\r\n";
$headers .= "X-Mailer: PHP's mail() Function\n";
$to = "abc@hotmail.com";
if(mail($to,$subject,$message,$headers)){
$msgsent = "Thanks for contacting Us";
}
$cemail = trim($_POST['cemail']);
$cname = trim($_POST['cname']);
$subject = "Contact Us";
$message .= "<table><tr><td>Name : </td><td>$cname</td></tr> <tr><td>Email : </td><td>$cemail</td></tr></table>";
$message .= trim($_POST['cmsg']);
$headers = "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\n";
$headers .= "From: $cname<$cemail>" . "\r\n";
$headers .= "X-Mailer: PHP's mail() Function\n";
$to = "abc@hotmail.com";
if(mail($to,$subject,$message,$headers)){
$msgsent = "Thanks for contacting Us";
}
- mbaldwin
- [1] reply
- shahriyar
- [1] reply
- mike32
- joekoffi
- [ 1 ] Thanks
- [1] reply
- Iconiplex
- pranjalisharma47 Banned
- Freescript
- ineagu
- botninja
- WebdevelopmentGroup
- sautaja
- BWHadam
- SJL
- Money Coach
- [1] reply
- huzoorbux
Next Topics on Trending Feed
-
18