Mail works in Production environment but not in Laragon - Laravel
-
I am getting this below error
stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed
My .env file is as below mentioned
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=username@gmail.com
MAIL_PASSWORD=password
MAIL_ENCRYPTION=tls
-
@zaster: Does it work with Mail Sender?
https://laragon.org/docs/mail-sender.html
-
@leokhoa it works very well with Mail Sender.
How can i set the .env file with Mail Sender
-
@zaster : How about changing your driver to
mail
?
-
tried changing the .env as below mentioned
MAIL_DRIVER=mail
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=username@gmail.com
MAIL_PASSWORD=password
MAIL_ENCRYPTION=tlsI am getting this error
Process could not be started [The system cannot find the path specified. ]
-
@zaster : It seems that Laravel's mail driver not work properly on Windows.
-
Is there a workaround for this issue
-
Laravel uses Swiftmailer which completely dropped support for the php mail() feature due to security concerns. It would be nice to see Laragon add support for SMTP instead, which can easily be configured in the laravel .env file. Having done a fair amount of digging, it appears that Laragon only supports mail() and Laravel supports everything but mail(). I ended up using mailtrap.io which is free, or if you want to be able to work offline you can install mailhog.
-
Try MailDev. It is another SMTP Server + Web Interface for viewing and testing emails during development.
-
Sad to see I have this problem too
-
@zaster , @crazedVic , @ivanhalen : I've made a tutorial about adding MailHog to Laragon:
https://forum.laragon.org/topic/886/tutorial-how-to-add-mailhog-to-laragon-and-make-it-autorun-with-procfileHope it help.