From 584e53a8b8ebd1ed89d3c7dabb0bc141b3ada5b2 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Mon, 29 Sep 2014 11:24:37 +0530 Subject: [PATCH] [fix] tests --- frappe/email/bulk.py | 3 ++- frappe/email/smtp.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/frappe/email/bulk.py b/frappe/email/bulk.py index 88d945c38d..f76a87c9a1 100644 --- a/frappe/email/bulk.py +++ b/frappe/email/bulk.py @@ -28,7 +28,8 @@ def send(recipients=None, sender=None, doctype='User', email_field='email', # No limit for own email settings smtp_server = SMTPServer() - if not smtp_server.email_account: + if smtp_server.email_account and not getattr(smtp_server.email_account, + "from_site_config", False): monthly_bulk_mail_limit = frappe.conf.get('monthly_bulk_mail_limit') or 500 if (this_month + len(recipients)) > monthly_bulk_mail_limit: diff --git a/frappe/email/smtp.py b/frappe/email/smtp.py index 4b39767db8..93eb87a91d 100644 --- a/frappe/email/smtp.py +++ b/frappe/email/smtp.py @@ -55,6 +55,7 @@ def get_outgoing_email_account(raise_exception_not_set=True): "email_id": frappe.conf.get("mail_login"), "password": frappe.conf.get("mail_password") }) + email_account.from_site_config = True if not email_account and not raise_exception_not_set: return None