How can i send emails without a server ? Only front-end Javascript with sendgrid or

darkylmnx picture darkylmnx · Aug 17, 2015 · Viewed 18.3k times · Source

i was wondering lately how i could send emails with only a front-end language like Javascript through Email as a Service apps like sendgrid or mandrill or so.

Sendgrid and mandrill have Curl APIS, so basically i can just do an AJAX post request to their API to send a mail but the thing is, i will have to put my API secret key in the JS file, this means it will be public... while it's supposed to be secret.

On those two apps, there's nothing in the docs concerning front-end use except having your own server which will use the API, but i'm currently on front-end based project. No server programming, the server only renders the assets that's all.

Do you guys know any method or apps of this kind to acheive this ? Thanks

Answer

Avik picture Avik · Jun 25, 2017

You can use FormSpree. Just provide the url in form action.

https://formspree.io/