Zoho & Nodemailer

Zoho & Nodemailer

Hi,

I am trying to set up nodemailer with zoho in my react application. Here is a snippet the code below:

``
const mailOptions = {
            from: nodeMailerUser,
            to: email,
            subject: `Your application for ${brand} account ${accountId} has been submitted`,
            replyTo: nodeMailerUser,
            html: applicationSubmit({name: name, brand: brand, accountId: accountId, paymentEmail: paymentEmail, date: date, currency: currency, type: typeOfAccount})
        };

        const transporter = nodemailer.createTransport({
            host: 'smtp.zoho.com',
            port: 465,
            secure: true, // use SSL
            auth: {
                user: nodeMailerUser,
                pass: nodeMailerPass
            }
        });

        transporter.sendMail(mailOptions)
``

1) The mailOptions nodeMailerUser and NodeMailerPass is from process.env.
2) I have tried different variations of..
   host: 'smtp.zoho.com',
   port: 465,
   secure: true, // use SSL

i.e I have tried with 'smtp.zoho.eu' with the above settings and have also tried with non-SSL and respective port.

Whatever way I try I get the same error message:

{ Error: Invalid login: 535 Authentication Failed
2018-10-16T20:13:22.674281+00:00 app[web.1]: at SMTPConnection._formatError (/app/node_modules/nodemailer/lib/smtp-connection/index.js:606:19)
2018-10-16T20:13:22.674283+00:00 app[web.1]: at SMTPConnection._actionAUTHComplete (/app/node_modules/nodemailer/lib/smtp-connection/index.js:1335:34)
2018-10-16T20:13:22.674286+00:00 app[web.1]: at SMTPConnection._responseActions.push.str (/app/node_modules/nodemailer/lib/smtp-connection/index.js:366:26)
2018-10-16T20:13:22.674287+00:00 app[web.1]: at SMTPConnection._processResponse (/app/node_modules/nodemailer/lib/smtp-connection/index.js:762:20)
2018-10-16T20:13:22.674289+00:00 app[web.1]: at SMTPConnection._onData (/app/node_modules/nodemailer/lib/smtp-connection/index.js:558:14)
2018-10-16T20:13:22.674290+00:00 app[web.1]: at TLSSocket._socket.on.chunk (/app/node_modules/nodemailer/lib/smtp-connection/index.js:709:51)
2018-10-16T20:13:22.674293+00:00 app[web.1]: at emitOne (events.js:116:13)
2018-10-16T20:13:22.674294+00:00 app[web.1]: at TLSSocket.emit (events.js:211:7)
2018-10-16T20:13:22.674296+00:00 app[web.1]: at addChunk (_stream_readable.js:263:12)
2018-10-16T20:13:22.674297+00:00 app[web.1]: at readableAddChunk (_stream_readable.js:250:11)
2018-10-16T20:13:22.674299+00:00 app[web.1]: at TLSSocket.Readable.push (_stream_readable.js:208:10)
2018-10-16T20:13:22.674300+00:00 app[web.1]: at TLSWrap.onread (net.js:601:20)
2018-10-16T20:13:22.674302+00:00 app[web.1]: code: 'EAUTH',
2018-10-16T20:13:22.674303+00:00 app[web.1]: response: '535 Authentication Failed',
2018-10-16T20:13:22.674304+00:00 app[web.1]: responseCode: 535,
2018-10-16T20:13:22.674306+00:00 app[web.1]: command: 'AUTH PLAIN' }

Please can you advise a solution?

Thanks,

Paul





                            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