Question

i am trying to send email using PHP scripts... however, the recipient is receiving it in his/her SPAM folder -this is not the desired result (I would like to have it sent directly to their inbox so that I don't have to warn them to look in their SPAM folder).

below is the code I use to send the email using PEAR... what changes can I make to prevent the emails from going into the SPAM folder?

send("test.user@gmail.com", $headers, $body); ?>
Was it helpful?

Solution

In general, email is classified as spam or not spam on the receiving end, not the sending end - otherwise, spammers would simply say that all of their messages aren't spam, completely defeating the purpose. Thus, you can't just force a message to go to a sender's inbox.

However, what you may need to do is see if the machine that you're using to send mail is currently listed on any spam blocklists, and if so, take the necessary steps to remove it from those blocklists. The most common is probably Spamhaus.

OTHER TIPS

How to increase the chance that the receiver doesn't mark an email as spam has been discussed quite some times here on SO. E.g.

How do you make sure email you send programmatically is not automatically marked as spam?

But there may be some tips specific to pear's Mail package on how to implement these steps (so I wouldn't consider this a duplicate ...yet).

You can purchase a dedicated IP address for your domain to patch this problem almost. After installing a dedicated static IP,all your email will have unique permanent sender ID...

GMail and other top mail services will list your email in Inbox...But yahoo and some other won't mind it....

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top