#node.js #reactjs #sendgrid
Вопрос:
У меня следующая ошибка при отправке электронной почты с помощью SendGrid
В чем может быть причина этой ошибки. Sendgrid устанавливается и импортируется
Error: getaddrinfo ENOTFOUND api.sendgrid.com
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:67:26) {
errno: -3008,
code: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'api.sendgrid.com',
config: {
url: '/v3/mail/send',
method: 'post',
data: '{"subject":"Invitation to join xxxxxxxxx","personalizations":[{"to":[{"email":"xxxx@gmail.com"}]}],"content":[{"value":"Email received from a friend at xxxxxxxxx \n Join xxxxxxxx to grow together","type":"text/plain"},{"value":"\n <h4>Email received from contact form: </h4>\n <p>Join xxxxxxxx to grow together</p>\n <hr />\n
<p>This email may contain sensitive information</p>\n <p>https://www.xxxxxxx.org</p>\n
","type":"text/html"}]}',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
'User-Agent': 'sendgrid/7.4.3;nodejs',
Authorization: 'Bearer xxxxxxxxxxxxx',
'Content-Length': 546
},
baseURL: 'https://api.sendgrid.com/',
transformRequest: [ [Function: transformRequest] ],
transformResponse: [ [Function: transformResponse] ],
timeout: 0,
adapter: [Function: httpAdapter],
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: Infinity,
maxBodyLength: Infinity,
validateStatus: [Function: validateStatus]
},
}
Я буду признателен вам за помощь