Enable SMTP over SSL or TLS? Not saving setting

Good Afternoon,

Using SuiteCRM 8.2.3 I am unable to save SSL as a setting within the Admin>Email Settings>Enable SMTP over SSL or TLS?. Each time I select SSL, hit save, when I go back in, it is cleared. Essentially, Email will not send, if I select SSL and hit Send email, it sends successfully, but soon as I hit save, it reverts to unselected. I’m also seeing an error when I attempt to save:

Fri Feb 3 10:13:08 2023 [5740][1][FATAL] log call at: modules/EmailMan/tpls/config.tpl:459 - styleChecked is not set

Any help you can offer would be GREATLY appreciated!!


Thanks for getting in touch

I am able to replicate this, via the Admin->Email Settings page

Interestingly, the value does appear to be set in the database correctly, so it may be an issue on the frontend.

As a quick workaround,

Could you trying going to Admin->Outbound Email Accounts

There should be a record here with Name and Type as “System”
(this record is created/updated by Admin->Email Settings)

If you edit this record, and set the SSL/TLS type, does it remain saved here?

If so, this should hopefully allow you to work around the Admin->Email Settings issue you’re seeing by configuring the System Email here.

Would you be able to try sending a Test Email, and confirm if this remains saved?

Thanks for your time!

On it. I’ll reply back with the results. Thanks so much!


It actually seems saved in the outbound account and working. Sending a test email only fails when sending it from the Syetem email setup…Odd. Thanks for your help!!


Thanks for getting back in touch, I’m glad that was a sufficient workaround!

Just to let you know, i’ve raised this as a bug in our Github repo:

So any fixes/updates on this can be tracked there.

Thank you again for bringing this to our attention!

Hey John, Thats great news!! We are attempting to Use SuiteCRM as an offering to one of our clients but I’m having an issue with the Check Inbound Email job. I explained it at:

Any chance you’d have an idea about this?

Now getting:

Fri Feb 17 09:15:06 2023 [5788][1][FATAL] Couldn’t connect to mail server id: d2c84800-4735-4d1b-e19d-63e6afb4ad7f
Fri Feb 17 09:15:06 2023 [5788][1][FATAL] SCHEDULERS: could not get an IMAP connection resource for ID [ d2c84800-4735-4d1b-e19d-63e6afb4ad7f ]. Skipping mailbox [ SSGInbound ].

With a different PHP version


Which PHP version are you using, by chance?

I actually noticed today that the Inbound Mail Scheduled Job has some issues in PHP8.1 and PHP8.2
(Raised here: PHP 8.1/8.2 - "Check Inbound Mailbox" Job fails on Email Accounts that use Basic Auth · Issue #9949 · salesagility/SuiteCRM · GitHub)

However, it does seem to work (for me) in PHP 8.0

Would you be able to give this a try in PHP 8.0?

Hi John, thanks so much for checking into this. I can only get inbound email to work on PHP 7.4, which is an issue as that PHP version is no longer supported. 8.0 results in Imap errors, above 8.0 causes the check inbound email job to fail…

I have change the match condition “===” to “==” and it is working for me.

file: include/utils.php
function: get_select_options_with_id_separate_key

$selected_key === $option_key does not working
change to
$selected_key == $option_key - is working

Asif Khalyani

1 Like

To clarify offshoreevolution’s answer
on version 7.13.1 the function is defined on line 1873

the problem line of code is within an if statement nested within a foreach loop.

the first condition is ($option_key !== ‘’ && $selected_key === $option_key)

the second half …“$selected_key === $option_key)” needs to be $selected_key == $option_key)

1 Like

Is this fix already made into a PR on Github?

I can confirm that the fix that @offshoreevolution proposed and @MadMart explained works for me also. I’m using Version 7.12.10

The line number in include/utils.php in the function starting at line 1873 is fixed by changing the line 1892:

              ($option_key !== '' && $selected_key === $option_key) || (


              ($option_key !== '' && $selected_key == $option_key) || (

@pgr , I didn’t check if the fix made it into a PR.

Thank you for your help everyone for the fix.


Thought I should add that I’m using php 7.3.31-1~deb10u3 and that there is no PR added.

After doing the 7.12.11 update, I had to fix the new utils.php file.

I see similar code in two places. Should I change them both, or just and only the exact one you posted?


              ($option_key !== '' && $selected_key === $option_key) || (


              ($option_key !== '' && $selected_key == $option_key) || (

$option_key === ‘’ && (($selected_key === ‘’ && !$massupdate) || $selected_key === ‘SugarMassUpdateClearField’)

When I attempt to send an email through workflows, I lose my password setting and have to enter it in again

Really? This is really (I mean, really) strange.

Which password are you referring to? The password on the definition of the email account, the one that gets sent to your email provider?

Which version of SuiteCRM and PHP are you running?

I sure agree with the really strange part, spent the majority of the day trying to figure out why the workflow wouldn’t work. Finally noticed the password and the “Enable SMTP over SSL or TLS” was lost on each workflow attempt.

Anyway, I’m using CRM7.13 and php 8.0. I’m downgrading (today) from php 8 to 7.4 today to see if it solves multiple issues (including on crm8 I’m testing also).

Can you please open an issue with this on Github?

And please be very specific regarding which screens you used to save the email account, there are several places in SuiteCRM for these configurations and many important bug reports are unusable due to lack of detail.

The same goes for your Workflow: we should aim for reproducing the bug with the exact same thing. Thanks!