Migration to JavaScript (ECMAScript 2022+)

Hello, just a simple question (did not find example within the community):

I need an example for sending eMails within JavaScript (ECMAScript 2022+); btw in Javascript (OH 3.x) was it:

var Actions = Java.type("org.openhab.core.model.script.actions.Things");
var mailActions = Actions.getActions("mail","mail:smtp:8d155b70b7");

br Nikolaus/HSR

Just about everything is covered in the add-on docs. They are very good and complete.

Thank you, i trying it and, here is the example:

var mailActions = actions.Things.getActions(“mail”,“mail:smtp:8d155b70b7”);
mailActions.sendMail(…);