1

I am running a simple order system based on PHP and MYSql on a shared Windows host.

I was using the standard Mail() PHP function in testing which was fine BUT a large number of my order acknowledgement emails when we moved to pre live stage were identified By BY, Yahoo etc as SPAM - usually linked to SMTP issue!!

So I moved to go to PEAR - but my hosting company doesnt support that (!!!). Is there another "standard" route that I am missing or do I have to get into some more intensive coding ?

steve
  • 31
  • 3
  • 4
    How you send the mail, PEAR, whatever, is not going to change anything. More to do with IP reputation and sending form a shared host. You should look at paying for a service like MailGun, etc. Also setting up SPF / DKIM and ultimately a DMARC policy. – ficuscr Jul 20 '18 at 17:17
  • check how often do you send emails. If you are trying to do massive emails - you will be blocked anyway. How many recipients do you have in one email? if any - you are in trouble. That is not your code but your product create this problem. How many users, addresses do you have in your client database? – Alex Jul 20 '18 at 17:21
  • 1
    there seems to be two issues - one is SMTP could be "more acceptable" and the other is that shared servers are "seen" as bulk submitters - ie a reputation issue. Is the simplest thing to swallow the cost and go to a dedicated server ? – steve Jul 20 '18 at 17:25
  • I seen ONE email per session. its a simple order acknowledgement after a client order is received. – steve Jul 20 '18 at 17:26

1 Answers1

3

As noted by ficuscr, the problem is almost definitely NOT the mail library, but rather other server-related issues.

In addition to possibly using a 3rd-party service to send the actual emails, a few things to look at include:

  1. Make sure that the IP address and/or domain for your web server are included in an SPF Record for your domain.

  2. Check your web server IP to see if it is on any Realtime Blacklists. If it is, then you want to see if you can get it removed. The problems are that (a) if you are on shared hosting then another web site on the same server/IP could cause the IP to be added back to the RBL very quickly if it is truly sending spam and (b) you often need the hosting company to ask for the removal instead of being able to make the request yourself.

  3. Check the bounce messages and you may find specific details that can help track down the problem. Unfortunately, some servers send back very cryptic or too-generic responses.

  • 1
    Thank you for the links in your answer. Very helpfull! – A. Meshu Jul 20 '18 at 17:34
  • The issue seems indeed to basically a "reputation" issue with shared server on my host - who seem to be in real trouble with the issue. But the issue was further clouded by some "mis-setup" of their systems. I have two work rounds - PHPMAiler seems to resolve the issue - once they got their configurations right and a Virtual Private Server allows a "clean reputation" - at a cost – steve Jul 21 '18 at 19:56