SMTP Mail error (Undefined variable: support_message (View: /resources/views/email/support/message.blade.php)

I saw the code relating to setting the config at runtime. Although from a little searching it appears Laravel Mail ignores config being set at run time. That is the problem I am experiencing.

It could be just my particular circumstances, I understand. But search results on Stack Overflow are indicating that this might be a Laravel problem that has existed since version 5 and possibly earlier. With multiple SO users writing explanations on why setting config at runtime has no effect on Laravel Mail. Recommending instead to use the underlying Swift mailer, or re-register the mail service provider after setting the config.

See here: php - Laravel - changing email settings on the fly is not working - Stack Overflow

@david

Can you tell me when the error is fixed and if i need to do anything except for updating to the latest version?

Thanks in advance

1 Like

Hi,

I have some new information for this subject.
In the laravel.log file was the following error:
[2021-08-05 18:11:47] production.INFO: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages:
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed

I think this is an ssl error on the mail server, but i have tried to connect it to the smtp servers from Gmail and i get the same error.

Maybe this will help you figuring out the problem.

I received this error too, used TLS instead.

I have found a fix for this issue.

I have installed Invoiceninja with the email handler on “log”. When the installation progress is done, i have changed it back to “smtp”.

To fix the SSL / TLS error, i used this solution from engrkashi:
stream_socket_enable_crypto(): SSL operation failed with code 1 Laravel 7 (laracasts.com)

I don’t know if this is the safest solution, but it worked for me