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