Connecting Tech Pros Worldwide Forums | Help | Site Map

Mail goes to bulk sent through php mail function

Newbie
 
Join Date: Jan 2008
Posts: 2
#1: Jan 14 '08
i am trying to send mail through php, it goes to bulk for rediff and yahoo. what should i do to prevent this?

stepterr's Avatar
Familiar Sight
 
Join Date: Nov 2007
Posts: 144
#2: Jan 16 '08

re: Mail goes to bulk sent through php mail function


I had a similar issue and found that if you change the way your email 'From' line looks that it may help correct the problem. Try using a from address with a real name, not just something like webserver@mysite.com, but instead:
Your Name<your.name@mysite.com>
or
WebServer<webserver@mysite.com>


Let me know how that works for you. There is also something you can do on your server, if you have control of it.
ifedi's Avatar
Member
 
Join Date: Jan 2008
Location: Abuja, Nigeria.
Posts: 46
#3: Jan 17 '08

re: Mail goes to bulk sent through php mail function


See, guys I've been having a similary problem, with Yahoo! Also, like the first reply said, I've suspected that a proper name preceding the email add, in the format:
Expand|Select|Wrap|Line Numbers
  1.  $headers.="From: John Mandela <jmandela@someweb.com>";
should solve the problem.
However, the problem I now face is , I keep getting this kind of error:
Expand|Select|Wrap|Line Numbers
  1. "PHP Warning: mail() [[color=#810081]function.mail[/color]]: SMTP server response: 501 5.5.4 Invalid Address in D:\Inetpub\wwwroot\plusclinic\mail.php on line 48" 
A little research suggests that the presence of the "John Mandela" is disliked by Windows, and so the error results. That's not enough for me, as I believe there ought to be some way to get round the mess.
So, someone should please help.
stepterr's Avatar
Familiar Sight
 
Join Date: Nov 2007
Posts: 144
#4: Jan 17 '08

re: Mail goes to bulk sent through php mail function


Are you using a third party host or is this your own server? You could install a spam filter, such as Spamassassin, and see what spam signatures are contained in your emails and then fix them that way. I've actually done this and it has worked for me. Another suggestion that I've seen, but have not needed yet, is if you manage your own server you could add a SPF record in your DNS zone file, which tells your mail server which IP's are allowed to send emails for your domain. Some places try and use these records to check for spam.
ifedi's Avatar
Member
 
Join Date: Jan 2008
Location: Abuja, Nigeria.
Posts: 46
#5: Jan 21 '08

re: Mail goes to bulk sent through php mail function


Quote:

Originally Posted by stepterr

Are you using a third party host or is this your own server? You could install a spam filter, such as Spamassassin, and see what spam signatures are contained in your emails and then fix them that way. I've actually done this and it has worked for me. Another suggestion that I've seen, but have not needed yet, is if you manage your own server you could add a SPF record in your DNS zone file, which tells your mail server which IP's are allowed to send emails for your domain. Some places try and use these records to check for spam.

Hello stepterr,
Thanks for your reply.
The real problem is NOT really "why is Yahoo! sending the mails to spam?"
The problem is "why is WinXP SP2 IIS 5 PHP dying with error when there is a From: Firstame Surname< email@address> but sends the mail happily when the Firstname Surname part is removed?"
stepterr's Avatar
Familiar Sight
 
Join Date: Nov 2007
Posts: 144
#6: Jan 22 '08

re: Mail goes to bulk sent through php mail function


Quote:

Originally Posted by ifedi

Hello stepterr,
Thanks for your reply.
The real problem is NOT really "why is Yahoo! sending the mails to spam?"
The problem is "why is WinXP SP2 IIS 5 PHP dying with error when there is a From: Firstame Surname< email@address> but sends the mail happily when the Firstname Surname part is removed?"

So I looked into this a little more and it turns out that it is a windows issue and that's why I haven't had the problem when I put a name in front of the email address. Anyways, take a look at one of the many links I found that is talking about it. They came up with a solution thanks to their hosting service it looks like. You might be able to work with that a bit to get it to work for yourself. Otherwise, try using Google on the your error and you will see a ton of hits dealing with it. Good luck!
Newbie
 
Join Date: Feb 2008
Posts: 1
#7: Feb 15 '08

re: Mail goes to bulk sent through php mail function


Finally I found the solution!!!

Visit this blog and it gives a good and great solution.
http://bestdeveloper.blogspot.com/
Reply