Email Digest - Custom Email Digest

Hi There, is there anyway to create our own email digest with our own content? For example, we want an email digest to send out all the new Sales Orders created in that week on a weekly basis.

Sure, you can easily custom code it.

Hi, where do I custom code the email digest?

we’re able to do this customization.

@Justin_Lu @Jasmine

Are you developer?
You can create report and send email.
You can write weekly scheduler(in hooks) to run your code weekly.

@makarand_b can you give syntax to send email

Hi All,
I also want to know the syntax of sending email.

Ruchin Sharma

@ruchin78 Best way is, you can search code in source file of Frappe and ERPNext.

I can give one example here, but if you search, you will get many example.

For sendemail code, check below example.

Sambhaji Kolate,
New Indictrans Technologies Pvt Ltd.

1 Like


I have written the below function for the same however the message is shown as “Email Sent” but I am not receiving any email though.

def email_test():
    frappe.sendmail(recipients="",sender="",subject="Library Articles Overdue", content="Test Email Generated from ERPNext", bulk=True)
    frappe.msgprint("Email Sent")

Ruchin Sharma

Is your outgoing email working,
You can check Bulk Email/Email Queue for your email sending status.

We’re having a rewrite of the email digest. So stay tuned!

I love the email digest, and specially its Quote!!!

Where do we edit the quote source though? For example, we’d like to insert quotes in a different language :slight_smile:

Edit: never mind, just grep-d it found it :slight_smile: cheers guys!

Please share what you found, for the lazy amongst us. :grinning:

/erpnext/setup/doctype/email_digest/ :slight_smile:

Have fun!

On a side note, we should bring the option to include quotes to every email that’s being sent. I can think of many use cases, for example, “our company value is”, “our company goal for this year is to bla bla” etc. I think this can nudge employees to behave just a little better, and actually do seek to receive an email from the system in a way that random quote may include “Jackpot, tell HR to allocate 2 hour paid leave for you” etc :slight_smile:

1 Like