-1

I ran into an issue while creating my registration form in Symfony 5.

Those are the commands I used to be able to build it.

composer create-project symfony/website-skeleton my_project_name
symfony console make:controller HomeController
composer require symfony/security-bundle
symfony console make:user
composer require --dev symfony/maker-bundle
symfony console make:registration-form

After that I set my MAILER_DSN and MAILER_URL and a username field in the form. And then, when I register, here is the error I have :

"Connection could not be established with host "ssl://smtp.gmail.com:465": stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed"

I checked in my database and the user is registred in it. But I guess it's about the mailing system for the confirmation of the registration.

Can someone help me with it?

Stephan Vierkant
  • 9,674
  • 8
  • 61
  • 97
  • 2
    Does this answer your question? [OpenSSL Error messages: error:1416F086:SSL routines:tls\_process\_server\_certificate:certificate verify failed](https://stackoverflow.com/questions/57358047/openssl-error-messages-error1416f086ssl-routinestls-process-server-certifica) – Nico Haase Jul 09 '21 at 12:38

1 Answers1

0

For Gmail you need composer req symfony/google-mailer

And your MAILER_DSN should look like this gmail+smtp://USERNAME:PASSWORD@default

See https://symfony.com/doc/current/mailer.html

Flash
  • 1,101
  • 1
  • 9
  • 13
  • I put that in .env.local file, so username is the email adress i suppose nothing is changing i have the same issue. yes yes i installed, google mailer bundle – Quentin2706 Jul 11 '21 at 15:05