skip to Main Content

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

2

Answers


  1. Chosen as BEST ANSWER

    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


  2. Follow these steps:

    1. Check your user password is correct
    2. Check your mail provider has not closed your account
    3. Remove the cache (config and everything)
      php artisan optimize:clear
    4. Try and check these mail ports one by one (25 or 465 or 587 or 2525)
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search