Issue
I've a PHP application that's running with Yii Framework and it's using the YiiMail extension that's is based in Swiftmailer.
My application was working perfectly yesterday, but today the follow error was launched:
fsockopen(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed
My Yii app config:
'mail' =>
array('class' => 'application.extensions.yii-mail.YiiMail',
'transportType' => 'smtp',
'transportOptions' => array(
'host' => 'smtp.gmail.com',
'username' => '**@gmail.com',
'password' => '***',
'port' => '465',
'encryption'=>'tls' ),
'viewPath' => 'application.views.mail',
'logging' =>false,
'dryRun' => false
)
ANSWER: A FAST SOLUTION
My app is running in Windows, so I did a fast configuration to solve this problem at moment.
I did a configuration with sendmail and it enable into my php.ini file.
Ps: The main problem is if you have many apps running in the same php. How don't this problem to me, it's is stand alone application, I just did.
Something like this:
sendmail.ini
[sendmail]
smtp_server=smtp.gmail.com
smtp_port = 587
#default_domain = gmail.com it's is not necessary
auth_username= your gmail@gmail.com
auth_password=your password
php.ini
[mail function]
sendmail_path = "path to sendmail installation"
SMTP = smtp.gmail.com
smtp_port = 587
Solution
If your current config was previously working, then suddenly stopped. Consider looking into the following:
I have encountered a similar problem before, enabling Less Secure Apps, then when I set 2 Step Verification for my google account, it stopped working.
Then generating an APP password, did the trick!
Answered By - Mark Ryan Orosa
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.