sending mail with PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
lasith
Forum Newbie
Posts: 1
Joined: Thu Dec 18, 2008 12:13 am

sending mail with PHP

Post 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);
 
syth04
Forum Newbie
Posts: 14
Joined: Thu Dec 18, 2008 12:12 am

Re: sending mail with PHP

Post 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.
Post Reply