How I can send an E-mail

Hello guys,
I search for a solution to send an E-Mail with Scriptable. I found in the document the method but I sadly I have not so much experience about js.
Could you provide me an example ?

Here is a basic example.

let eml = new Mail();
eml.toRecipients = [""];
eml.subject = "Just a quick e-mail";
eml.body = "Told you it was quick";

This will then show the populated e-mail composition window ready for sending. If you need to send automatically, I think you would need to look at handing off to another app to do that for you as Scriptable specifically supports sending mail via the composition popup.

Hope that helps.