2

This has happened from time to time in the past with the emails showing up eventually hours to days later, however I sent some emails last week with a true result to Gmail and they still haven't arrived.

I've checked both the inbox and the spam folder to no avail.

If the php email function is returning true there must be an issue on their server correct?

Rooster
  • 485
  • 2
  • 7
  • 21

1 Answers1

3

The PHP email function returns true if the mail subsystem of your server (sendmail for example) accepts your message for delivery.

However, the mail may not actually be sent by sendmail if it isn't configured to do so (or it may be trying to send mail and failing). Look on your server in the /var/log/maillog or whatever log file your mail server is sending mail too. There should be messages there saying whether the mail was sent or not.

webtoe
  • 1,946
  • 11
  • 12
  • will I need to check this via shell? – Rooster Apr 16 '12 at 15:08
  • Almost certainly. I assume you're doing this on Linux? If you're not that knowledgeable on Linux then it might be easier to get someone who knows it better to sort this out for you. By default, most distributions have a default configuration that is mostly sensible but often needs to be tweaked to allow mail to be sent correctly (and get past various spam rejection techniques that other mail servers employ i.e. having correct From headers/envelope). – webtoe Apr 16 '12 at 15:11
  • hmm. well I am skilled enough to set up cronjobs now and then but thats more of a unix thing I suppose? Im just not understanding why the email has completely stopped working for no change on my end. There was a ddos attack on dreamhost last week and I'm wondering if that has something to do with it. – Rooster Apr 16 '12 at 15:23
  • 1
    There could be any number of reasons. Other servers may just be more picky about where they accept mail from (requiring correct headers, SPF records etc.) or your server's IP address may have ended up in a blacklist. You can check on www.spamhaus.org or there may be messages in the logs. – webtoe Apr 16 '12 at 15:27
  • it looks like they've recently changed their spf policy and this is causing all kinds of problems. Nice call. – Rooster Apr 17 '12 at 15:10