Answers.Body: <p>My proposal is using CiviCRM Extension like this one <a href="https://github.com/scardinius/ams" rel="nofollow">Alternate Mailing Server</a>.</p>
  
  <p>Assumptions:</p>
  
  <ul>
  <li>each alternate server has own setting <code>mailing_backend_alternate[1-9]</code>,
  
  <ul>
  <li>first at <code>mailing_backend_alternate1</code>,</li>
  <li>second at <code>mailing_backend_alternate2</code>,</li>
  </ul></li>
  <li>in session variable is stored which server will be used, </li>
  <li>server is changed by <code>hook_civicrm_alterMailer()</code>.</li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-02-19T14:33:59.343Z
Answers.LastActivityDate: 2016-02-19T14:33:59.343Z
Answers.UserDisplayName: Scardinius
Body: <p>I would like to be able to use different mail servers to send different emails, for instance:</p>
  
  <ul>
  <li>all transactional emails (contribution receipt, event registration...) sent by our mail server, all mass mailing sent using mandrill</li>
  <li>all the emails sent by media@example.org are pushed through mandrill, but those sent by member@example.org via our own mail server</li>
  <li>do A/B testing between two different mail providers to see if mailjet or mailchimps provide better deliverability</li>
  </ul>
  
  <p>I do think it would need some coding, either as extension or to modify civicrm core, but would love to be proven wrong.</p>
  
  <p>Assuming we need to add this feature, would it be useful for you too? </p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-02-04T17:51:58.343Z
Comments.Text: That would be definitely a great feature.
Comments.UserDisplayName: Andrei
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-02-04T21:12:06.983Z
Comments.Text: If it were flexible to handle mandrill or mailchimp, a lot of people would use this, I think.
Comments.UserDisplayName: Allen Hutchison
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-02-25T06:26:38.510Z
Comments.Text: Note that while the answer below is a good one, in the case of Mailchimp vs. Mandrill, changes to the Mandrill TOS most likely render this moot in your case: http://blog.mandrill.com/important-changes-to-mandrill.html
Comments.UserDisplayName: Jon G - Megaphone Tech
Tags: <civimail><developer>
Title: Is there a way to alternate between different outbound mail servers?
ThreadText: # Is there a way to alternate between different outbound mail servers?
  
  (Asked by: username_0 on 2016-02-04)
  
  I would like to be able to use different mail servers to send different emails, for instance:
  
  * all transactional emails (contribution receipt, event registration...) sent by our mail server, all mass mailing sent using mandrill
  * all the emails sent by media@example.org are pushed through mandrill, but those sent by member@example.org via our own mail server
  * do A/B testing between two different mail providers to see if mailjet or mailchimps provide better deliverability
  
  I do think it would need some coding, either as extension or to modify civicrm core, but would love to be proven wrong.
  
  Assuming we need to add this feature, would it be useful for you too?
  
  **Tags:** civimail, developer
  
  > **Comments:**
  > **username_1**: That would be definitely a great feature.  
  > **username_2**: If it were flexible to handle mandrill or mailchimp, a lot of people would use this, I think.  
  > **username_3**: Note that while the answer below is a good one, in the case of Mailchimp vs. Mandrill, changes to the Mandrill TOS most likely render this moot in your case: http://blog.mandrill.com/important-changes-to-mandrill.html  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_4 on 2016-02-19. Score: 2
  
  My proposal is using CiviCRM Extension like this one [Alternate Mailing Server](https://github.com/username_4/ams).
  
  Assumptions:
  
  * each alternate server has own setting `mailing_backend_alternate[1-9]`,
    + first at `mailing_backend_alternate1`,
    + second at `mailing_backend_alternate2`,
  * in session variable is stored which server will be used,
  * server is changed by `hook_civicrm_alterMailer()`.
  
  
  ---
  
  