for employee in employees:
if employee.user_id:
# Personalize the message with the employee's name
message = f"Dear {employee.employee_name},\n\nPlease submit your timesheet by the end of today.(Dont take any leave till 28 specially for kavya)\n\nBest Regards,\nNstarxinc"
# Send an email notification
frappe.sendmail(
recipients=employee.user_id,
subject="Reminder: Submit Your Timesheet",
message=message
)
@Prashanth_Kolhetkar please change status inactive to Active
employees = frappe.get_all(‘Employee’, filters={‘status’: ‘Active’}, fields=[‘name’, ‘user_id’, ‘employee_name’])