In which file can I find this function:
frappe.sendmail(
recipients=recipients,
subject=frappe.(‘Birthday Reminder’),
template=‘birthday_reminder’,
args=dict(
reminder_text=reminder_text,
birthday_persons=birthday_persons,
message=message,
),
header= (‘Birthday Reminder’),
delayed=False
)
I want to add delayed = False if it will help !
Where the file that I can update this function ?
1 Like
smino
October 30, 2024, 12:04pm
3
Hi,
The email code is in apps/frappe/frappe/email.
It might be helpful to look at the email queue report and error logs to see if there are any relevant messages to explain the delay.
ejaaz
October 30, 2024, 12:29pm
4
mohamed_prosepra:
Where the file
holidays=holidays,
frequency=frequency[:-2],
),
header=email_header,
)
# ------------------
# BIRTHDAY REMINDERS
# ------------------
def send_birthday_reminders():
"""Send Employee birthday reminders if no 'Stop Birthday Reminders' is not set."""
to_send = int(frappe.db.get_single_value("HR Settings", "send_birthday_reminders"))
if not to_send:
return
sender = get_sender_email()
employees_born_today = get_employees_who_are_born_today()
for company, birthday_persons in employees_born_today.items():
File path of employee birthday reminder.
my problem when I send email take more times may be not sent
I have to go to email queue and send it now.
I need to send email immediately
ejaaz
October 30, 2024, 12:42pm
6
You can override this function and add a delayed
argument when calling the function.
could you please give me how can I add it ?
ejaaz
October 30, 2024, 12:56pm
8
If you want to override it, you’ll need a custom app and will have to use monkey-patching to override this function. After overriding, add the delayed
argument when calling the birthday reminder function.
The birthday reminder function runs daily via a cron job at 12 AM. It sends bulk emails, so it can take time. Did you need to send a different email immediately, and were you using the birthday email as just a reference for your question?
I need to send normal email!
take more 10 minutes and may be not sent.
I need to send email immediately.
normal email not birthday!