-2

Hi I have tried this https://www.youtube.com/watch?v=JJ44WA_eV8E for sending an email.

But i got error as

Error: Missing credentials for "PLAIN" at SMTPConnection._formatError (F:\Chatbot\POC\Test\node_modules\nodemailer\lib\smtp-connection\index.js:606:19) at SMTPConnection.login (F:\Chatbot\POC\Test\node_modules\nodemailer\lib\smtp-connection\index.js:350:38) at connection.connect (F:\Chatbot\POC\Test\node_modules\nodemailer\lib\smtp-transport\index.js:270:32) at SMTPConnection.once (F:\Chatbot\POC\Test\node_modules\nodemailer\lib\smtp-connection\index.js:188:17) at SMTPConnection.g (events.js:291:16) at emitNone (events.js:86:13) at SMTPConnection.emit (events.js:185:7) at SMTPConnection._actionEHLO (F:\Chatbot\POC\Test\node_modules\nodemailer\lib\smtp-connection\index.js:1128:14) at SMTPConnection._processResponse (F:\Chatbot\POC\Test\node_modules\nodemailer\lib\smtp-connection\index.js:762:20) at SMTPConnection._onData (F:\Chatbot\POC\Test\node_modules\nodemailer\lib\smtp-connection\index.js:558:14) code: 'EAUTH', command: 'API'

Suggest me the solutions

Luca Kiebel
  • 9,790
  • 7
  • 29
  • 44
Manoj Ganesan
  • 18
  • 1
  • 5
  • It seems the API you use does need some form of credentials. – Luca Kiebel Sep 19 '18 at 10:13
  • Please post all the details. The error is only showing you missed some credentials. If you will post your code and where you are getting error than everyone can help you. here is how to ask a question https://stackoverflow.com/help/how-to-ask – A.K. Sep 19 '18 at 10:36

1 Answers1

0

To send free mail we can use Gmail. For sending mail node js having npm module nodemailer. How to use nodemailer you can see official documentation here

For authentication, we have to create an app on Gmail.

How to create OAuth details from Gmail: http://masashi-k.blogspot.com/2013/06/sending-mail-with-gmail-using-xoauth2.html

Few URL will also help you.

Nodemailer with Gmail and NodeJS

https://nodemailer.com/smtp/oauth2/

https://medium.com/@nickroach_50526/sending-emails-with-node-js-using-smtp-gmail-and-oauth2-316fe9c790a1

A.K.
  • 2,284
  • 3
  • 26
  • 35