title: Best way to separate email and frontend server
body: <p>I am running an Apache server with PHP. Until now, emails to users have been sent from this Apache server using PHP's <code>mail()</code> function.</p>
  
  <p>To optimize this structure, I would like to separate the email part on a separate server (running qmail exclusively).</p>
  
  <p>Now that the Apache server does not have any email software anymore, what is the best way to have it send email (i.e. send the email content to the new mail server) ? As far as I know, PHP's <code>mail()</code> function is not well suited to send mails from a separate server.</p>
  
  <p>Thank you</p>