Send Mail with Google API from Frontend JavaScript with JWT

14 Views Asked by At

On my website I have a contact field that should send a mail from my own account to my own account when submitted. Is it possible to send a mail with the Google Mail API from Frontend JavaScript?
My goal is to not do it on behalf of a user. I would like to hardcode the credentials of my own account (like access token and refresh token) in the website so that the user does not have to sign in.

I'm aware of the security risk this would have, I created a new throwaway google account only for this purpuse which forwards all messages to my personal mail.

0

There are 0 best solutions below