0

When attempting to send an email through node.js, I used the example from https://github.com/sendgrid/sendgrid-nodejs-example. I have changed the sendgrid username and password in the javascript files and I know that they are correct but the function still responds with error 535. How do I fix this or is there any easier way to send emails with javascript or node.js

Tassos
  • 13
  • 5

1 Answers1

-1

There is an easier way. Create an API key and then use:

var sendgrid   = require('sendgrid')(sendgrid_apikey);

The API Key value will be of this format: 'xx.xxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxx'

And see the following question for clarification on how to create and get the key:

SendGrid API Key not working. "The provided authorization grant is invalid, expired or revoked"

Community
  • 1
  • 1
Justin Steele
  • 2,230
  • 13
  • 16