diff --git a/frappe/utils/email_lib/email_body.py b/frappe/utils/email_lib/email_body.py index 21efc59001..a2f242b216 100644 --- a/frappe/utils/email_lib/email_body.py +++ b/frappe/utils/email_lib/email_body.py @@ -23,8 +23,6 @@ def get_email(recipients, sender='', msg='', subject='[No Subject]', for attach in (attachments or []): emailobj.add_attachment(**attach) - emailobj.validate() - return emailobj class EMail: diff --git a/frappe/utils/email_lib/smtp.py b/frappe/utils/email_lib/smtp.py index 543fd67702..688d08e2fb 100644 --- a/frappe/utils/email_lib/smtp.py +++ b/frappe/utils/email_lib/smtp.py @@ -15,6 +15,8 @@ def send(email, as_bulk=False): frappe.msgprint(_("Emails are muted")) return + email.validate() + try: smtpserver = SMTPServer() if hasattr(smtpserver, "always_use_login_id_as_sender") and \