[SOLVED] Error "Sorry, sending the message to request your confirmation failed" but not when logged as the admin

Thank you for the reply! I added the code on config .php but the behavior is the same, with a different error.

Error sending email to binws@protonmail.com SMTP connect() failed.

When I’m logged as the admin the confirmation mail is sent without problems from the subscription page, but when I try on the same page not logged it says again “Sorry, sending the message to request your confirmation failed, etc…”