title: PHP mail is sending to local e-mail server
body: <p>I have just published the website of one of my customers but am facing issues with getting the contact form to work properly.</p>
  
  <p>Their website is hosted on server A (uses DirectAdmin).
  Their e-mail is hosted at an external company ('server B') using other MX entries in their DNS.</p>
  
  <p>The contact form is supposed to send all e-mails to info@domainname.com at server B. The e-mails however, are not being sent to the external e-mail box at server B, but they're sent to the local e-mail box on server A.</p>
  
  <p>Looks like the server/PHP is thinking that the e-mail is local anyway because the e-mail domain matches the domain in DirectAdmin, right?</p>
  
  <p>Is there any way I can avoid this? Like making the PHP e-mail future know that the e-mail is not local? Or is the only option to use SMTP?</p>