[fix] tests

This commit is contained in:
Rushabh Mehta 2014-09-29 11:24:37 +05:30
parent 66dae496da
commit 584e53a8b8
2 changed files with 3 additions and 1 deletions

View file

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

View file

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