Hi
I try to write codes about sending email using Zend Framework. Here is the code,
$mail = new Zend_Mail('utf-8');
$mailConfig = array(
'auth'=> 'login',
'username' => '[email protected]',
'password' => 'samplepassword',
'ssl' => 'tls',
'port' => '587';
$tr = new Zend_Mail_Transport_Smtp('smtp.gmail.com', $mailConfig);
Zend_Mail::setDefaultTransport($tr);
$mail->setSubject('test email');
$mail->setBodyText('body');
$mail->setFrom('[email protected]', 'Just a sample');
$mail->addTo('[email protected]', 'Another sample');
$mail->send();
These codes work perfectly at my local computer, but failed to send email at the server side with return message "Connection time out". I guess there might be some configuration problem on the server side, but I don't know what it is. Anyone with idea what is going wrong?