Merge pull request #1890 from KanchanChauhan/logout-on-not-finding-password-fixed

Logout issue on not providing password fixed for Email Account
This commit is contained in:
Rushabh Mehta 2016-07-24 22:24:39 +05:30 committed by GitHub
commit c4d305b4ec

View file

@ -93,6 +93,8 @@ class EmailAccount(Document):
if self.enable_outgoing:
if not self.smtp_server:
frappe.throw(_("{0} is required").format("SMTP Server"))
if not self.password:
frappe.throw(_("{0} is required").format("Password"))
server = SMTPServer(login = getattr(self, "login_id", None) \
or self.email_id,
@ -105,6 +107,9 @@ class EmailAccount(Document):
def get_server(self, in_receive=False):
"""Returns logged in POP3 connection object."""
if not self.password:
frappe.throw(_("{0} is required").format("Password"))
args = {
"host": self.email_server,
"use_ssl": self.use_ssl,