Browse Source

[hotfix] validate email object before smtp send

version-14
Anand Doshi 10 years ago
parent
commit
8966806ebf
2 changed files with 2 additions and 2 deletions
  1. +0
    -2
      frappe/utils/email_lib/email_body.py
  2. +2
    -0
      frappe/utils/email_lib/smtp.py

+ 0
- 2
frappe/utils/email_lib/email_body.py View File

@@ -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:


+ 2
- 0
frappe/utils/email_lib/smtp.py View File

@@ -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 \


Loading…
Cancel
Save