How can i automatically generate an attendance report that shows employees who have been absent for three consecutive days and send it to the relevant recipient?
you need to make template and send it by frappe.sendmail
frappe.sendmail(
recipients= emp.company_email,
subject=_(emp.first_name +' , Attendance ' + emp.to_date.strftime('%d-%m-%Y') ),
template="email_template",
now=True,
args=dict(
attnds =result,
emp = emp,
report_summary = report_summary,
today_date = datetime.today().date()
),
header=email_header
)
thanks