Monday, May 22, 2017

Sending mail with Plesk server and Laravel -- 'SSL operation failed with code 1'

I'm trying to set up outgoing mail server on my Laravel project. The mail server and web server are on the same box so I'm using localhost for the hostname.

I tested it successfully with Mailtrap.

Has anyone set up Plesk outgoing mail server with Laravel? Plesk uses Postfix as a mailserver by default. Here is my configuration in Laravel:

MAIL_DRIVER=smtp
MAIL_HOST=localhost
MAIL_PORT=587
MAIL_USERNAME=username I use to sign in to plex
MAIL_PASSWORD=password I use to sign in to plex
MAIL_ENCRYPTION=tls
MAIL_FROM=admin@mysite.net
MAIL_NAME=mysite

And this is the error Laravel (swiftmailer) gives me:

error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

Am I using the wrong credentials? What's going on?



via f7n

Advertisement