There’s a blockly library for mail (Mail Actions) that you can install under add-ons.
https://community.openhab.org/t/mail-actions/138423
Another possibility would be to use the inline-script-block (under run&process) that can hold any Javascript-code.
I never tried sending mails with openhab as I use telegram for any kind of notification which works great with openhab.