All email services require some sort of authentication to send the emails on your behalf. That makes it a really bad idea to use them directly from client side – revealing your password or your secret keys will allow anyone send emails on your behalf.

EmailJS keeps your authentication details on the server side, and the client side code just triggers a predefined email template, similarly to how any client-server application is working.