Merge branch 'develop'
This commit is contained in:
commit
68dc63c28e
4 changed files with 10 additions and 9 deletions
|
|
@ -13,7 +13,7 @@ import os, importlib, inspect, json
|
|||
from .exceptions import *
|
||||
from .utils.jinja import get_jenv, get_template, render_template
|
||||
|
||||
__version__ = "7.0.7"
|
||||
__version__ = "7.0.8"
|
||||
|
||||
local = Local()
|
||||
|
||||
|
|
|
|||
|
|
@ -106,13 +106,13 @@ class EmailAccount(Document):
|
|||
|
||||
def get_server(self, in_receive=False):
|
||||
"""Returns logged in POP3 connection object."""
|
||||
|
||||
args = {
|
||||
|
||||
args = frappe._dict({
|
||||
"host": self.email_server,
|
||||
"use_ssl": self.use_ssl,
|
||||
"username": getattr(self, "login_id", None) or self.email_id,
|
||||
"use_imap": self.use_imap
|
||||
}
|
||||
})
|
||||
if self.password:
|
||||
args.password = self.get_password()
|
||||
|
||||
|
|
|
|||
|
|
@ -29,10 +29,10 @@ def send(email, append_to=None):
|
|||
smtpserver.sess.sendmail(email.sender, email.recipients + (email.cc or []), email_body)
|
||||
|
||||
except smtplib.SMTPSenderRefused:
|
||||
frappe.msgprint(_("Invalid login or password"))
|
||||
frappe.throw(_("Invalid login or password"), title='Email Failed')
|
||||
raise
|
||||
except smtplib.SMTPRecipientsRefused:
|
||||
frappe.msgprint(_("Invalid recipient address"))
|
||||
frappe.msgprint(_("Invalid recipient address"), title='Email Failed')
|
||||
raise
|
||||
|
||||
def get_outgoing_email_account(raise_exception_not_set=True, append_to=None):
|
||||
|
|
|
|||
|
|
@ -68,13 +68,14 @@ frappe.form.formatters = {
|
|||
value.replace(/^.(.*).$/, "$1");
|
||||
}
|
||||
|
||||
if(options && options.for_print) {
|
||||
return value;
|
||||
}
|
||||
|
||||
if(frappe.form.link_formatters[doctype]) {
|
||||
value = frappe.form.link_formatters[doctype](value, doc);
|
||||
}
|
||||
|
||||
if(options && options.for_print) {
|
||||
return value;
|
||||
}
|
||||
if(!value) {
|
||||
return "";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue