Hi guys, i am using xampp (windows) with latest php version and laravel 5.4. here is my .env settings
MAIL_DRIVER = smtp
MAIL_HOST = smtp.gmail.com
MAIL_PORT = 587
MAIL_USERNAME = myemail@gmail.com
MAIL_PASSWORD = mypassword
MAIL_ENCRYPTION = tls
and the controller code
use Mail;
Mail::send('mail.login-verificatio', $data, function($message) use($email_to) {
$message->to($email_to, '')->subject
('Login Security Number');
$message->from('myemail@gmail.com','xxxxxxxxxxx');
});
but i found the following error
ErrorException
stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed
is anything need to configure in xampp or laravel ? thanks
Hi saiful! I think you need config in xampp. You can follow the steps:
SMTP=smtp.gmail.com
smtp_port=587
sendmail_from = myemail@gmail.com
sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"
[sendmail]
smtp_server=smtp.gmail.com
smtp_port=587
error_logfile=error.log
debug_logfile=debug.log
auth_username=myemail@gmail.com
auth_password=password
force_sender=mmyemail@gmail.com
Now you done, remember restart xampp. Good luck!!!
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community