Is it possible that email sent via mail()
won't be sent based on the originating page?
I have two pages, both are sending exactly the same content, in that for $result=mail($to, $subject, $message, $headers);
, the result and parameters are byte-for-byte equal, with the same crc32()
hash.
Even though mail()
is returning true
in all cases, we're getting emails for only one of the pages. Checked all the folders, including Spam and Trash. Tech support at the server side says they are seeing them in the sendmail
log, so apparently they are going out.
We're setting From
with a confirmed working email address. Nothing bounces back. Also tried setting Return-Path
just to see, nothing.
Have also tested sending just regular emails, i.e. not identical, and still the same results. Emails from one page are consistently not received, while those from the other are.
I have never seen anything like this before. Can anyone shed some light on the issue?
Latest developments:
the code is now identical on both pages; still receiving emails from only one!
support just shrugged and said "must be the filename, try a different one"
That's not a great fix for us because it would mean canceling an approved binary at the app distribution site, resubmitting a revised one, then waiting for the approval process. Can take weeks.
Instead, what we're doing is dispatching using curl
from the page with a "bad name" to a page with a "good name"! FYI, the bad name is apparently ws.php
!