Merge branch 'latest' of github.com:webnotes/wnframework into latest
This commit is contained in:
commit
1fec27fac7
1 changed files with 3 additions and 2 deletions
|
|
@ -210,15 +210,16 @@ class EMail:
|
|||
"""
|
||||
Gets a smtp connection
|
||||
"""
|
||||
from webnotes.utils import cint
|
||||
import smtplib
|
||||
sess = smtplib.SMTP(self.server, self.port or None)
|
||||
sess = smtplib.SMTP(self.server.encode('utf-8'), cint(self.port) or None)
|
||||
|
||||
if self.use_ssl:
|
||||
sess.ehlo()
|
||||
sess.starttls()
|
||||
sess.ehlo()
|
||||
|
||||
ret = sess.login(self.login, self.password)
|
||||
ret = sess.login(self.login.encode('utf-8'), self.password.encode('utf-8'))
|
||||
|
||||
# check if logged correctly
|
||||
if ret[0]!=235:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue