使用的Zend_Mail而不是使用Gmail配置
$settings = array('ssl'=>'ssl',
'port'=>465,
'auth' => 'login',
'username' => '[email protected]',
'password' => 'YOUR_PASSWORD');
$transport = new Zend_Mail_Transport_Smtp('smtp.gmail.com', $settings);
$email_from = "YOUR_EMAIL";
$name_from = "YOUR NAME";
$email_to = "TO_EMAIL";
$name_to = "TO NAME";
$mail = new Zend_Mail();
$mail->setReplyTo($email_from, $name_from);
$mail->setFrom ($email_from, $name_from);
$mail->addTo ($email_to, $name_to);
$mail->setSubject ('Testing email using google accounts and Zend_Mail');
$mail->setBodyText ("Email body");
$mail->send($transport);
http://blog.josedasilva.net/zend-framework-sending-emails-using-zend_mail-and-google-smtp/
發送郵件