Sendgrid Error
const info = await emailSender.send({
from: {
name: name,
email: "customer@requestphotoedit.com",
},
to: "mericozcan.project@gmail.com",
subject: subject,
text:
html:
});
I am trying to send mail, I authenticate my Sendgrid account, added DNS configuration and everything and getting this error:
Access to XMLHttpRequest at 'https://api.sendgrid.com/v3/mail/send' from origin 'https://requestphotoedit.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The 'Access-Control-Allow-Origin' header has a value 'https://sendgrid.api-docs.io' that is not equal to the supplied origin.
When I check stackoverflow, it says I cannot send mail over Javascript code? https://stackoverflow.com/questions/54797626/react-unable-to-send-email-with-sendgrid
Help me plz
from: {
name: name,
email: "customer@requestphotoedit.com",
},
to: "mericozcan.project@gmail.com",
subject: subject,
text:
Some text,html:
Some text,});
I am trying to send mail, I authenticate my Sendgrid account, added DNS configuration and everything and getting this error:
Access to XMLHttpRequest at 'https://api.sendgrid.com/v3/mail/send' from origin 'https://requestphotoedit.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The 'Access-Control-Allow-Origin' header has a value 'https://sendgrid.api-docs.io' that is not equal to the supplied origin.
When I check stackoverflow, it says I cannot send mail over Javascript code? https://stackoverflow.com/questions/54797626/react-unable-to-send-email-with-sendgrid
Help me plz
Stack Overflow
I am using react to send emails:
const sgMail = require('@sendgrid/mail');
sgMail.setApiKey(process.env.REACT_APP_SENDGRID);
const msg = {
to: 'test@example.com',
from: 'test@example.com',
const sgMail = require('@sendgrid/mail');
sgMail.setApiKey(process.env.REACT_APP_SENDGRID);
const msg = {
to: 'test@example.com',
from: 'test@example.com',
