title: Setting up PHPMailer with Office365 SMTP
body: <p>I am attempting to set up PHPMailer so that one of our clients is able to have the automatically generated emails come from their own account. I have logged into their Office 365 account, and found that the required settings for PHPMailer are:</p>
  
  <pre><code>Host: smtp.office365.com
  Port: 587
  Auth: tls
  </code></pre>
  
  <p>I have applied these settings to PHPMailer, however no email gets sent (The function I call works fine for our own mail, which is sent from an external server (Not the server serving the web pages)).</p>
  
  <pre><code>"host"      =&gt; "smtp.office365.com",
  "port"      =&gt; 587,
  "auth"      =&gt; true,
  "secure"    =&gt; "tls",
  "username"  =&gt; "clientemail@office365.com",
  "password"  =&gt; "clientpass",
  "to"        =&gt; "myemail",
  "from"      =&gt; "clientemail@office365.com",
  "fromname"  =&gt; "clientname",
  "subject"   =&gt; $subject,
  "body"      =&gt; $body,
  "altbody"   =&gt; $body,
  "message"   =&gt; "",
  "debug"     =&gt; false
  </code></pre>
  
  <p>Does anyone know what settings are required to get PHPMailer to send via smtp.office365.com?</p>