def send_birthday_reminders():
 if int((frappe.db.get_single_value(u'HR Settings', u'stop_birthday_reminders') or 0)):
  return
 from frappe.utils.user import get_enabled_system_users
 users = None
 birthdays = get_employees_who_are_born_today()
 if birthdays:
  if (not users):
   users = [(u.email_id or u.name) for u in get_enabled_system_users()]
  for e in birthdays:
   frappe.sendmail(recipients=filter((lambda u: (u not in (e.company_email, e.personal_email, e.user_id))), users), subject=_(u'Birthday Reminder for {0}').format(e.employee_name), message=_(u"Today is {0}'s birthday!").format(e.employee_name), reply_to=(e.company_email or e.personal_email or e.user_id))

def send_birthday_reminders ( ) : if int ( ( frappe . db . get_single_value ( u'HR Settings' , u'stop_birthday_reminders' ) or 0 ) ) : return from frappe . utils . user import get_enabled_system_users users = None birthdays = get_employees_who_are_born_today ( ) if birthdays : if ( not users ) : users = [ ( u . email_id or u . name ) for u in get_enabled_system_users ( ) ] for e in birthdays : frappe . sendmail ( recipients = filter ( ( lambda u : ( u not in ( e . company_email , e . personal_email , e . user_id ) ) ) , users ) , subject = _ ( u'Birthday Reminder for {0}' ) . format ( e . employee_name ) , message = _ ( u"Today is {0}'s birthday!" ) . format ( e . employee_name ) , reply_to = ( e . company_email or e . personal_email or e . user_id ) )
send employee birthday reminders if no stop birthday reminders is not set .