php - Can't figure out why SMTP email does not work to the same domain it's sending from -


i have php customer input form sends out smtp mail company hosting form. reason emails not reaching recipient's email. if substitute in other email address not on domain works out fine. can list multiple addresses on to: line , others email not desired info@ email address. cannot change sending domain since web hosting won't send mail when mismatched. thought might have sending email address , receiving being same changed from: address "onlineform@" instead of "info@" made no difference.

i'm perplexed what's happening here. can send email directly other account "info@" email address , works fine. i've asked them check client and server junk mail folders , both clean. ideas on what's going on or how further diagnose issue? i've simplified code down relevant parts below , snippet code same thing.

<?php $email_to = "info@domain.tld"; $email_subject = "subject line here"; $email_message = "email body here.";  $headers = 'from: onlineform@domain.tld'."\r\n". 'reply-to: noreply@domain.tld'."\r\n" . 'x-mailer: php/' . phpversion(); @mail($email_to, $email_subject, $email_message, $headers); ?> 

it have server's mail policy. may telling server message being sent whatever@domain.tld, not proving it.

have tried send using smtp authentication? not sure real problem, worth testing.

also, recommend always use mail solutions instead of using plain php mail() function. i've used php mailer long time , not works fine, eased boring process of sending e-mails through php.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -