Hi PHP People,
When using mail() with a TO address that includes a subdomain, as in
foo@sub.domain. com, the intended recipient never receives the mail.
I'm not sure if this is a problem with mail() or a misconfiguratio n of
the mail program (postfix on dev server, qmail on production server),
but foo@sub.domain. com doesn't receive any mail, while foo@domain.com
gets it every time.
Any thoughts will be greatly appreciated!
echo 'mail() test - WITHOUT SUBDOMAIN<br />';
// this works fine
mail(
'foo@domain.com ',
'this is the subject',
'this is the message',
"From: bar@domain.com\r\n"
);
echo 'mail() test - WITH SUBDOMAIN';
// this doesn't work
mail(
'foo@sub.domain .com',
'this is the subject',
'this is the message',
"From: bar@domain.com\r\n"
);
When using mail() with a TO address that includes a subdomain, as in
foo@sub.domain. com, the intended recipient never receives the mail.
I'm not sure if this is a problem with mail() or a misconfiguratio n of
the mail program (postfix on dev server, qmail on production server),
but foo@sub.domain. com doesn't receive any mail, while foo@domain.com
gets it every time.
Any thoughts will be greatly appreciated!
echo 'mail() test - WITHOUT SUBDOMAIN<br />';
// this works fine
mail(
'foo@domain.com ',
'this is the subject',
'this is the message',
"From: bar@domain.com\r\n"
);
echo 'mail() test - WITH SUBDOMAIN';
// this doesn't work
mail(
'foo@sub.domain .com',
'this is the subject',
'this is the message',
"From: bar@domain.com\r\n"
);
Comment