title: Set a different SMTP for Newsletter in Magento
body: <p>i was wondering if it's possible to set two different SMTP server on Magento:</p>
  
  <p>one for the Newsletter and one for the Magento System emails.</p>
  
  <p>I saw around that is possible to set SMTP in template.php but that will affect all the emails. Is then possible two different ones?</p>
  
  <p>Thank you all !!</p>
  
  <p>Ps:</p>
  
  <p>I tried to modify the file /app/code/core/Mage/Newsletter/Model/Template.php
  as suggested on post :
  <a href="https://stackoverflow.com/questions/11558156/magento-how-to-make-smtp-server-working">Magento - How enable SMTP server authentication and secure transport?</a></p>
  
  <p>and used the code in this way:</p>
  
  <pre><code>public function getMail()
  
   {
          if (is_null($this-&gt;_mail)) {
             /*Start of added code to specify config*/
             $my_smtp_host = 'smtp.mysmtp.com';  // Take it from Magento backoffice or you can specify it here
             $my_smtp_port = '587';    // Take it from Magento backoffice or you can specify it here
  
             $config = array(
  
                      'port' =&gt; $my_smtp_port, //optional - default 25
                      'auth' =&gt; 'login', 
                      'username' =&gt; 'mylogin@email.it',
                      'password' =&gt; 'mypassword'
                  );
  
              $transport = new Zend_Mail_Transport_Smtp($my_smtp_host, $config);
  
              Zend_Mail::setDefaultTransport($transport);
              /*End of added code to specify config*/
  
              $this-&gt;_mail = new Zend_Mail('utf-8');
          }
          return $this-&gt;_mail;
      }
  </code></pre>
  
  <p>Unfortunatly is taking the system smtp instead of using this one.</p>
  
  <p>I also commented the two lines:</p>
  
  <pre><code>ini_set('SMTP', Mage::getStoreConfig('system/smtp/host'));
  ini_set('smtp_port', Mage::getStoreConfig('system/smtp/port'));
  </code></pre>
  
  <p>Any idea why is still using the system one?</p>