DocType email trigger


In the Menu dropdown there is an option of emailing the current doctype that works fine. I would like to fill in the recipient address automatically based on an option of the doctype.
Can you please inform me what is the javascript trigger of Menu–>Email option, to put all my logic inside?

Thank you!

Run this script = "";

Before triggering the Menu → Email


Worked! Thank you @bohlian!