title: How to use Zend_Mail_Transport_Smtp with hosted Google Apps?
body: <p>So I'm under the impression that bad things will happen if I don't use <code>Zend_Mail_Transport_Smtp</code> when sending lots of emails. Problem is...I can't figure out how to set it up. I am using Google Apps hosted email for my domain. So to access my email, I go to mail.mydomain.com, which takes me to a google login page.</p>
  
  <p>This is the code that I am using, but it's not working.</p>
  
  <pre><code>$config = array('ssl' =&gt; 'tls', 'port' =&gt; 587, 'auth' =&gt; 'login', 'username' =&gt; 'webmaster@mydomain.com', 'password' =&gt; 'password');
  $smtpConnection = new Zend_Mail_Transport_Smtp('mail.mydomain.com', $config);
  </code></pre>
  
  <ul>
  <li>Using "mail.mydomain.com" I get a "connection timed out" error (which makes me think its the wrong thing to use.</li>
  <li>Using "smtp.mydomain.com" I get a "Could not open socket" error.</li>
  </ul>
  
  <p>What am I doing wrong?</p>