瀏覽代碼

Logout issue on not providing password fixed for Email Account

version-14
Kanchan Chauhan 9 年之前
父節點
當前提交
cb5252608d
共有 1 個檔案被更改,包括 5 行新增0 行删除
  1. +5
    -0
      frappe/email/doctype/email_account/email_account.py

+ 5
- 0
frappe/email/doctype/email_account/email_account.py 查看文件

@@ -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…
取消
儲存