Search code examples
laravelreset-passwordlaravel-10mailtrap

stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages: error:0A00010B:SSL routines::wrong version number


I'm new to Laravel; I'm trying to send reset password email with Mailtrap, bun when I try it, I got this error:

Connection could not be established with host "ssl://sandbox.smtp.mailtrap.io:465": stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages: error:0A00010B:SSL routines::wrong version number

this is my .env file:

MAIL_MAILER=smtp
MAIL_HOST=sandbox.smtp.mailtrap.io
MAIL_PORT=465
MAIL_USERNAME=454d94****52fa
MAIL_PASSWORD=991eae****e5b5
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS="[email protected]"
MAIL_FROM_NAME="${APP_NAME}"
  • I received a new username and password from Mailtrap
  • I tried with all 4 available ports
  • I logged in with another google account to mailtrap and try it with new username and password

I tried all these things but still got this error


Solution

  • I was able to solve the problem after two days!
    The problem was from Mailtrap
    Once I installed the mailpit package on localhost, I was able to receive the recovery email easily