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:
commit
c4d305b4ec
1 changed files with 5 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue