Sending Email with Zoho, Nodejs and Nodemailer

Sending Email with Zoho, Nodejs and Nodemailer

I am using Zoho email credentials to shoot an email.
Below is my code to create a transport instance
const transporter = nodemailer.createTransport({
  host: "smtp.zoho.com",
  auth: {
    user: process.env.APP_EMAIL,
    pass: process.env.APP_PASSWORD,
  },
  port: 465,
  secure: true,
  tls: {
    rejectUnauthorized: false,
  },
  requireTLS: true, });

I'm getting below error

>>>>>>>>error>>>>>>>> Error: Invalid login: 535 Authentication Failed
    at SMTPConnection._formatError (C:\Techgigs Dhokla House\New Dhokla\DhoklaHouseAPI\node_modules\nodemailer\lib\smtp-connection\index.js:790:19)
    at SMTPConnection._actionAUTHComplete (C:\Techgigs Dhokla House\New Dhokla\DhoklaHouseAPI\node_modules\nodemailer\lib\smtp-connection\index.js:1548:34)
    at SMTPConnection.<anonymous> (C:\Techgigs Dhokla House\New Dhokla\DhoklaHouseAPI\node_modules\nodemailer\lib\smtp-connection\index.js:546:26)
    at SMTPConnection._processResponse (C:\Techgigs Dhokla House\New Dhokla\DhoklaHouseAPI\node_modules\nodemailer\lib\smtp-connection\index.js:953:20)
    at SMTPConnection._onData (C:\Techgigs Dhokla House\New Dhokla\DhoklaHouseAPI\node_modules\nodemailer\lib\smtp-connection\index.js:755:14)
    at SMTPConnection._onSocketData (C:\Techgigs Dhokla House\New Dhokla\DhoklaHouseAPI\node_modules\nodemailer\lib\smtp-connection\index.js:193:44)
    at TLSSocket.emit (node:events:527:28)
    at addChunk (node:internal/streams/readable:324:12)
    at readableAddChunk (node:internal/streams/readable:297:9)
    at Readable.push (node:internal/streams/readable:234:10)
    at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23) {
  code: 'EAUTH',
  response: '535 Authentication Failed',
  responseCode: 535,
  command: 'AUTH PLAIN'
}

What is the issue?
My code is incorrect or something else?





                            Zoho Desk Resources

                            • Desk Community Learning Series


                            • Digest


                            • Functions


                            • Meetups


                            • Kbase


                            • Resources


                            • Glossary


                            • Desk Marketplace


                            • MVP Corner


                            • Word of the Day



                                Zoho Marketing Automation


                                        Manage your brands on social media



                                              Zoho TeamInbox Resources

                                                Zoho DataPrep Resources



                                                  Zoho CRM Plus Resources

                                                    Zoho Books Resources


                                                      Zoho Subscriptions Resources

                                                        Zoho Projects Resources


                                                          Zoho Sprints Resources


                                                            Qntrl Resources


                                                              Zoho Creator Resources


                                                                Zoho WorkDrive Resources



                                                                  Zoho Campaigns Resources

                                                                    Zoho CRM Resources

                                                                    • CRM Community Learning Series

                                                                      CRM Community Learning Series


                                                                    • Tips

                                                                      Tips

                                                                    • Functions

                                                                      Functions

                                                                    • Meetups

                                                                      Meetups

                                                                    • Kbase

                                                                      Kbase

                                                                    • Resources

                                                                      Resources

                                                                    • Digest

                                                                      Digest

                                                                    • CRM Marketplace

                                                                      CRM Marketplace

                                                                    • MVP Corner

                                                                      MVP Corner

                                                                    





                                                                    




                                                                        Design. Discuss. Deliver.

                                                                        Create visually engaging stories with Zoho Show.

                                                                        Get Started Now