title: Zend Mail - can't send mail from online server - connection refused error
body: <p>I'm using the zend framework and have a script which sends emails. However my script send emails perfectly on my localhost but I keep getting a fatal error on my online server:</p>
  
  <pre><code>Fatal error: Uncaught exception 'Zend_Mail_Protocol_Exception' with message 'Connection refused' in ....
  </code></pre>
  
  <p>The stack trace pin points just my emailing code which is below:</p>
  
  <pre><code>$tr = new Zend_Mail_Transport_Smtp($smtp, $config);
  $mail = new Zend_Mail();
  $mail-&gt;setDefaultTransport($tr);
  $mail-&gt;setFrom($from, $from_name);
  $mail-&gt;addTo($one_email);
  $mail-&gt;setSubject( $subject );
  $mail-&gt;setBodyText($content);
  $mail-&gt;send($tr);
  </code></pre>
  
  <p>Whats wrong here why is the connection being refused :(</p>