In PHP, I am getting this error while sending email:
"fsockopen() [function.fsockopen]: unable to connect to tls://smtp.gmail.com:465 (Connection timed out)".
Can anyone help me to dynamically load openssl.ddl extention through .htaccess file or any other means other than dl().
I am working with Yii and this is how my main.php is:
'mail' => array(
'class' => 'application.extensions.yii-mail.YiiMail',
'transportType'=>'smtp', /// case sensitive!
'transportOptions'=>array(
//'host'=>$smtp_host,
'host'=>'smtp.gmail.com',
//'username'=>$smtp_username,
'username'=>'[email protected]',
//'password'=>$smtp_password,
'password'=>'testtest10',
//'port'=>'543',
'port'=>'465',
'encryption'=>'tls',
//'encryption'=>'ssl',
),
'viewPath' => 'application.views.mail',
'logging' => true,
'dryRun' => false
),
can anyone please let me know where I am wrong....
Connection timed outis not the error you'd get if the openssl module wasn't loaded, it would be something likeUnable to find the socket transport "tls" - did you forget to enable it when you configured PHP?I'm guessing you have a firewall blocking you.