No emails after upgrade

Can someone please help me resolve an error I’ve been cracking my head with. After upgrading to version 12, emails from the system do not go with the following error

a bytes-like object is required, not ‘str’
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/email/”, line 441, in send_one
smtpserver.sess.sendmail(email.sender, recipient.recipient, encode(message))
File “/home/frappe/frappe-bench/apps/frappe/frappe/email/”, line 206, in sess
cint(self.port) or None)
File “/usr/lib64/python3.6/”, line 251, in init
(code, msg) = self.connect(host, port)
File “/usr/lib64/python3.6/”, line 324, in connect
if not port and (host.find(‘:’) == host.rfind(‘:’)):
TypeError: a bytes-like object is required, not ‘str’

My Setup
OS: centos 7
erpnext: version 12
pythone: 3.6

nothing systems to appear in /var/log/maillog

Perhaps specify your smtp port value?

Also same traceback here Email SMTP Issue