Email domain configuration, in Custom Server

Hi everyone I am trying to set up an email service on erpnext production on a custom server but it’s not working and not saving the domain configuration
the same configurations work on the local server and work on frappe cloud

how can I check if the problem is on the SSL certificate or something else?

check the error log or console.