DEV Community

AZmotion
AZmotion

Posted on

Send email on Form Submission using Serverless Functions and SendGrid (NO Formspree) HTML/JS [React Vue Angular]

Write a Serverless function from scratch using the SendGrid V3 API to send emails containing the user's form submission data.
This can be used with any host & framework (React, Angular, Vue, etc.), however this tutorial is done in vanilla HTML/Javascript using Netlify as a static web host.

Bring your brand to life with AZmotion. Get custom web, motion or graphic design and solidify your brand identity.
Contact me: https://azmotion.com/contact​
Portfolio: https://azmotion.com/portfolio​

GitHub Repository: https://link.azmotion.com/sendgrid-netlify-functions

Needed downloads/websites:

Yarn: https://classic.yarnpkg.com/en/docs/install
Node (& npm): https://nodejs.org/en/download/​
Netlify: https://www.netlify.com/​
SendGrid: https://sendgrid.com/​
SendGrid npm package: https://www.npmjs.com/package/@sendgrid/mail
Axios: https://github.com/axios/axios​ (CDN preferred and needed in some cases)

Liked this tutorial? Feel free to contribute:

https://azmotion.com/contribute​

Top comments (0)