I'm using the php function mail() to send out emails when someone signs on for my service. For some reason, some emails are not delivered to the user. I even asked my users to check their spam/junk folders, and they said there's no email from my service. Does anyone know how to solve this problem? Thanks!
They may be adding a whitespace to the email. I recommend using trim or better yet str_replace to make sure the white characters are not there. If you are getting the emails from a database I can send you a script I made that will make sure all emails are good to go, but it is not perfect. If you are getting the emails from a get statement make sure the email has whitespaces removed before get or post data is sent or else it will get messy.
Thats depend if the recipient have block your ip or domain, for example yahoo dont accept any mail from my server
Some email providers will not accept emails if the server's rDNS is not set or if it's set incorrectly. That's one thing to check. Also see what the sender's email address is set to. Some phpmailer setups use the hostname of the webserver instead of using the actual domain that's sending the email. That's another thing to check. If you could post the header of an email message that made it though, we may be able to tell more.
What's wrong with using Google's smtp server? http://lifehacker.com/software/email-apps/how-to-use-gmail-as-your-smtp-server-111166.php I'm able to send email to hotmail and yahoo with no problems
if its not whitespaces or wrong emails .. and if your script usually works , and if the servers yorue sending to arent blocking them, ..then its your server thats not allowing them to all go out ...why? dont know. and check for possible injected code. somebody could be sending your users to their site? just a possibility - but if your code is normal , ask your server.