I use PHP mail() function to send emails from my website. No problems with addresses, headers etc…
The function actually sends emails, but it seems that they can’t reach some specific addresses.
Examples:
- mail from x@domain1.com to x@domain1.com,y@domain2.com – received on
x, not received on y - mail from x@domain1.com to y@domain2.com,x@domain1.com – received on
x, not received on y - mail from y@domain2.com to x@domain1.com,y@domain2.com – received on
x, not received on y - mail from y@domain2.com to y@domain2.com,x@domain1.com – received on
x, not received on y
why is this happening?
If you’re sending mail, and it’s being received by one person but not another, the problem is almost always due to an issue at the receiver’s end.
I’d say that your email is most likely getting stuck in a spam filter somewhere. An email sent through PHP tends to look very like email that’s been sent by a spammer – you’ve got a
From:header that doesn’t match the server that sent it, and it’s been sent to multiple people. Do you also have aReply-to:header set, too?If you use your code to send as basic an email as you can, see if that gets through to y; then you can start adding in the extra headers until you get to the point that it stops working again….