Greetings to the community!
I have recently developed a web page with Laravel 9.X, which works correctly in local, but when I upload it to my Host, I am having problems with sending emails.
When I have been testing locally, it has been working correctly, and I have been using mailtrap. Now that I have uploaded it to the server, I have my own SMTP, and it is not working for me. I have the ssl certificate created, but there is no way it will send me any mail. I get the following error:
Unable to connect with STARTTLS: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.
SSL working fine when i visit the site with https.
I have configured my .env file, where I have put:
HOST: my smtp server; PORT: 587; ENCRYPTION TYPE: SSL; USERNAME AND PASSWORD: Those of my email account.
I have been touching also my file located in config/mail.php, putting the same configuration as in the .env file. I have also tried with other ports like 25, 465... among others.
I have tried to access the mail account from outlook, using the IMAP protocol, and I have been able to connect correctly, so the mail can be accessed.
I have checked lot of things in Google, and also every blogs y found in Stack Overflow, but nothing worked.
Any idea what is going on? Am I missing something to configure?