Reputation: 1328
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:
why is this happening?
Upvotes: 0
Views: 373
Reputation: 10732
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 a Reply-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....
Upvotes: 1