Our server hosts domain.com and we have a third party email service running all of the emails for @domain.com. When PHP dispatches emails to firstname.lastname@example.org they are not being sent outside of the server because it's thinking that the email is hosted locally.
Is there any way to force sendmail to look for the true location of the MX records to route the email to the appropriate place?
Even using a third party smtp service (AuthSMTP) the emails are still not making it outside of the server.
Any help is appreciated.
You could use a library like swiftmailer which can connect to an external mail server. It is also possible to reconfigure sendmail to relay externally for the local domain have a look at this: http://stackoverflow.com/questions/322659/sendmail-and-mx-records-when-mail-server-is-not-on-web-host