Cant get value from field of doctype

I want to send a mail on save to the mail in the field “reports_to”
The following server and client script works but I need to mention the exact mail which need to send and trying things like recipient = frm.doc.reports_to says stuff like doc is not defined or frm is not defined
im new to ERPNext/Frappe pls let me know what i should do
frappe.db.get_single_value
frm.doc.reports_to
etc has not worked
Below is the client and server script



frappe.sendmail(
        recipients="example@mail.com",
        subject=_("Hello!"),
        message=_("Hi!"),
        delayed=False
)

message = f"""
        Hello 
    """
frappe.ui.form.on('Form Test', {
    after_save: function(frm) {
        console.log(frm);
        frappe.call({
            method: 'send_email_to_reports_to',
            args: {doc:frm.doc}, // pass frm.doc instead of doc
            callback: function() {
                
            }
        });
    }
});

Welcome to the Community @Vizdrom,

You know, ERPNext has this great feature called Notifications. If you haven’t looked into it yet, please check the documentation. I believe your issue could be resolved using the Notification feature. I understand that you want to send an email after saving and to a specific user using report_email, and this feature is already available in the Notification doctype.

Also check the video.

I hope this helps.

Thank You!