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!!

Hey!

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!

Hey,

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!!

Hey!

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

Hey!

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

Regards,
Asif Khalyani

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?