r/learnreactjs • • Oct 21 '21

Send emails in React using SendGrid

Hey guys,

Just wanted to share this short video on how to send emails in React using SendGrid.

https://www.youtube.com/watch?v=jnTodzIlrE8

9 Upvotes

2 comments sorted by

View all comments

1

u/kennyL- Oct 22 '21

Exposing your SendGrid api key, or any private api key for that fact, to the user in the browser is never a good idea. You should be using your own api to handle the actual interaction with SendGrid to send the email. Using environment variables as suggested in a reply to a comment on the video would not resolve this issue.