Emails not going after securing site

I’m running on the latest version-12 and everything else seems seems okay except that I cannot send emails. This is after using letsencrypt to secure site. I’ve followed several threads for a solution to no avail. I’m running muti-tenant and if I create another site and not secure it, I can send mails from the new site

This Solution does not seem to apply to version 12

Thank you in advance

When I try to access communication list, I get error that say Invalid Email account despite that this account was working before enabling letsencrypt

If I open email accounts and try to change anything on the one account I use as default outgoing I get
TypeError: argument should be integer or bytes-like object, not ‘str’

When I try to save

From the error log I have the following

Title
frappe.email.queue.flush

Error
argument should be integer or bytes-like object, not ‘str’

Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/email/queue.py”, line 406, in send_one
smtpserver.sess.sendmail(email.sender, recipient.recipient, encode(message))
File “/home/frappe/frappe-bench/apps/frappe/frappe/email/smtp.py”, line 206, in sess
cint(self.port) or None)
File “/usr/local/lib/python3.7/smtplib.py”, line 251, in init
(code, msg) = self.connect(host, port)
File “/usr/local/lib/python3.7/smtplib.py”, line 324, in connect
if not port and (host.find(‘:’) == host.rfind(‘:’)):
TypeError: argument should be integer or bytes-like object, not ‘str’

Have your tried

$ bench --site all enable-scheduler

However, looking at the error trace, can you check that your Email Domain and Email Account settings are correct and working?

Probably your smtp port is to blame? Search results for 'smtp port after:2018-09-01' - ERPNext Forum

Thank you @lasalesi. Yes I had made sure scheduler is enabled but still no success. I’m still searching for any subtle errors in the settings

Thank @clarkej. Checking now