Page 1 of 1

sending mail with PHP

Posted: Thu Dec 18, 2008 12:44 am
by lasith
i was coded for send a confirmation mail(html mail) to the registered user. its working, but the problem is the yahoo and hotmail is recognize it as a spam mail or junk :( . this is my coding, anyone plz help me.

Code: Select all

 
$to=$_POST['mail'];
$subject="Welcome";
 
$msg="<html>blablabla</html>";
 
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-Type:text/html \r\n";
$headers .= 'From: lasith_nt@hotmail.com<lasith_nt@hotmail.com>\r\n';
 
mail($to,$subject,$msg,$headers);
 

Re: sending mail with PHP

Posted: Thu Dec 18, 2008 1:46 am
by syth04
More and likely its because of your IP address is a DHCP address. This will cause most SMTP mail receivers to mark it as spam. I you are using dhcp for the mail server, then you might want to look for a service like smtp forwarder. I have had this problem, and just gave up using my own mail server, and letting google mail just handle all mail services. Really sucks that I cant use it because the customer or client wont get email from my servers unless you buy/lease a static ip address from your ISP. I hope this helps you.