Hello, I send scheduler_events through i create one api it api through all customer in added custom_email_for_sending in add value to send mail total i get 400 customer but api run that through only 50 customer to send mail how to send mail to all(400) customer
your API is only sending emails to 50 out of 400 customers. This might be happening because of limits on how many emails your system can send at once ( or maybe API limit).
Ok @NCP I not pass send mail limit in code my code is:
@frappe.whitelist(allow_guest=True)
def send_welcome_emails_to_customers():
customers = frappe.get_all(
doctype=“Customer”,
filters={“custom_email_for_sending”: [“is”, “set”]},
fields=[“name”, “custom_email_for_sending”]
)
for customer in customers:
custom_email = customer.get(“custom_email_for_sending”)
customer_name = customer.get(“name”)
download_ar_report_pdf(custom_email,customer_name)
It looks like your code is correct and trying to send emails to all customers with a set custom email. However, only 50 emails are being sent. This issue could be due to a few reasons, such as server timeouts or limits on concurrent operations.