Adding SMTP options to .env file

Hi, what's the correct way to add options to the SMTP settings in the .env files?

I've added this to my .env.dev.local file:

SMTP_OPTIONS='verify_peer=false' # Other options (as query string)

Is this correct?

Thing is, nothing that I add to SMTP_OPTIONS gets to where it's needed. I've tried both with and without PHP Mailer.

With PHP Mailer on, in src/PhpMailerTransportFactory.php, $this->settings['OPTIONS'] is always empty, so I don't think the SMTP_OPTIONS are being loaded correctly, or they should be in a different format inside the .env file. Which one is it?

Thanks.

PS: I was getting an exception while sending mail with PHP Mailer on. Had to make a change in src/PhpMailerTransport.php (109):

    //PHPMailer::setLanguage($langId); // this was causing the exception
    $this->mailer->setLanguage($langId); // added this instead

You should set it via advanced setting SMTP options (as query string).

Thanks. I did that and now it works.

However, I've noticed that SENDER_EMAIL (which is a setting in the .env files) is hardcoded in src/config.php. Any chance that could point to the .env setting, to avoid double settings?