feat: add reply_to in email students

This commit is contained in:
Hussain Nagaria
2023-10-17 22:01:04 +05:30
committed by Jannat Patel
parent f1b791845b
commit 697e81df10
2 changed files with 10 additions and 2 deletions

View File

@@ -384,11 +384,12 @@ def get_timetable_details(timetable):
@frappe.whitelist()
def send_email_to_students(batch, subject, message):
def send_email_to_students(batch, subject, reply_to, message):
frappe.only_for("Moderator")
students = frappe.get_all("Batch Student", {"parent": batch}, pluck="student")
frappe.sendmail(
recipients=students,
subject=subject,
message=message,
reply_to=reply_to,
message=message
)