diff --git a/lms/lms/doctype/lms_batch/lms_batch.py b/lms/lms/doctype/lms_batch/lms_batch.py index 68ac25a7..8cd2c7d8 100644 --- a/lms/lms/doctype/lms_batch/lms_batch.py +++ b/lms/lms/doctype/lms_batch/lms_batch.py @@ -384,11 +384,9 @@ 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, + recipients=students, subject=subject, reply_to=reply_to, message=message ) diff --git a/lms/www/batches/batch.js b/lms/www/batches/batch.js index 9614a924..7eb1e7fb 100644 --- a/lms/www/batches/batch.js +++ b/lms/www/batches/batch.js @@ -784,6 +784,12 @@ const email_to_students = () => { label: __("Subject"), reqd: 1, }, + { + fieldtype: "Data", + fieldname: "reply_to", + label: __("Reply To"), + reqd: 0, + }, { fieldtype: "Text Editor", fieldname: "message", @@ -806,6 +812,7 @@ const send_email = (values) => { args: { batch: $(".class-details").data("batch"), subject: values.subject, + reply_to: values.reply_to, message: values.message, }, callback: (r) => {