Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to send email with ReactJS and SendGrid?

I have setup and account on SendGrid. I have got the API key and Node.js methods. I am creating an web app with React js. I want to send emails through SendGrid. I am unable to find any solution. Please help me with my question with an example.

like image 455
Amit Pandey Avatar asked Oct 15 '25 02:10

Amit Pandey


1 Answers

Its not possible with react as it is a frontEnd library, if you try to implement with react you will get these errors

---> Refused to set unsafe header "User-Agent"

If you need to set those headers then you'll need to make the request from your server and not your visitor's browser.

So this is not possible from react and you will need to use some backend or firebase for it.

like image 90
Kumar Avatar answered Oct 16 '25 15:10

Kumar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!