I am trying to send a mail to different domain name as my mail server is located on another domain. Therefore, whenever I try to send an email using php mail
function then it consider as the local email mail and send it. However, I want to send it another domain. Lets say:
$to='example@gmail.com' //this works
$to='example@mydomain.com' //this does not work.
When I checked it using the WHM
I figured it out that it consider the emails as the local mail and hence the such email does not exist on my web domain so it disappears.
How can I reroute my emails to send it to correct domain ?
Update
I can see following error on WHM mail error logs:
third_party: Domain where my mail server is located
mydomain : current web domain.
ravi@mydomain.com.au R=lookuphost T=remote_smtp: SMTP error from remote mail server
after RCPT TO:<ravi@mydomain.com.au>: host mail.mydomain.com.au: 550-Verification failed
for <third_party@server.third_party.com.au>\n550-The mail server could not deliver mail to
third_party@server.third_party.com.au. The account or domain may not exist, they may be
blacklisted, or missing the proper dns entries.\n550 Sender verify failed