title: Sendmail multiple SMTP account
body: <p>I would like to set two SMTP accounts with sendmail. I have successfully set up for one account, but I am not sure how to set up the second account with sendmail and use it.</p>
  
  <p>sendmail.mc</p>
  
  <pre><code>define(`SMART_HOST',`[smtp.office365.com]')dnl
  define(`RELAY_MAILER_ARGS', `TCP $h 587')dnl
  define(`ESMTP_MAILER_ARGS', `TCP $h 587')dnl
  define(`confAUTH_OPTIONS', `A p')dnl
  TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
  define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
  FEATURE(`authinfo',`hash -o /etc/mail/authinfo/office365-auth.db')dnl
  </code></pre>
  
  <p>I would appreciate if anyone could help me with this matter.</p>