0

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:

  1. mail from [email protected] to [email protected],[email protected] - received on x, not received on y
  2. mail from [email protected] to [email protected],[email protected] - received on x, not received on y
  3. mail from [email protected] to [email protected],[email protected] - received on x, not received on y
  4. mail from [email protected] to [email protected],[email protected] - received on x, not received on y

why is this happening?

2
  • 2
    Are you mailing both recipients with one mail() call or two? Does either domain1.com or domain2.com exist on the same server or hosting environment at your PHP script? Commented May 9, 2012 at 14:22
  • I use only one 'mail()' call and neither domain1.com nor domain2.com are on the same server of my script Commented May 10, 2012 at 9:20

1 Answer 1

1

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....

Sign up to request clarification or add additional context in comments.

3 Comments

I think you're right, problems are on receiver's end. I've setted both 'From:' and 'Reply-to:' as sender's address, just like 'Return-Path:'.
I've contacted domain2.com owners to ask about this problem
Do you need the Reply-to in there, if you're already using their email address as From? That might be enough to sort it, all by itself....

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.