How to send an email using JavaScript without using mailto?

To send an email using JavaScript without using mailto, do this: window.open('mailto:hey@whaa.dev').

Here's how you do it:

// opens the default mail client
window.open('mailto:hey@whaa.dev');