Jul 8, 2020
0
Level 3
Mail sending using Gmail SMTP
I am trying to send email using gmail smtp. everything working fine in localhost (win 10) but On server (Cpanel Based) show error:
stream_socket_enable_crypto(): Peer certificate CN='mydomain' did not match expected CN='smtp.gmail.com'
my config
MAIL_MAILER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME='[email protected]'
MAIL_PASSWORD='apppass'
MAIL_ENCRYPTION="tls"
MAIL_FROM_ADDRESS='[email protected]'
MAIL_FROM_NAME="${APP_NAME}"
https://stackoverflow.com/questions/32515245/how-to-to-send-mail-using-gmail-in-laravel according to this suggestion when I use
MAIL_MAILER=sendmail
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME='[email protected]'
MAIL_PASSWORD='apppass'
MAIL_ENCRYPTION="tls"
MAIL_FROM_ADDRESS='[email protected]'
MAIL_FROM_NAME="${APP_NAME}"
no error but mail not sending.
Please or to participate in this conversation.