Merge pull request #649 from NagariaHussain/feat-reply-to

feat: add reply_to in email students dialog
This commit is contained in:
Jannat Patel
2023-10-18 12:35:46 +05:30
committed by GitHub
2 changed files with 9 additions and 4 deletions

View File

@@ -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
)