Thank you so much for this solution! Saved me from having to buy something from the Marketplace. I have two questions:

1) how do i write the code (// name: ‘name of the sender’,) so that the sender name defaults to the user name instead of hard coding a particular name in there? i want other non-tech people in my org to use the script and i want to do that by sending them a “ready to use” file. If they have to go in and change code, that could be an issue.

2) is there a way to adjust the code or my email so it is not perceived as bulk mail by some email servers? I tested the script to go to a gmail account and an outlook account. The email that went to Outlook ended up in Spam folder.

Thanks for your help.