nodemailer | ✉️ Send e-mails with Node.JS – easy as cake | Email library

 by   nodemailer JavaScript Version: 6.9.10 License: Non-SPDX

kandi X-RAY | nodemailer Summary

kandi X-RAY | nodemailer Summary

nodemailer is a JavaScript library typically used in Messaging, Email, Nodejs applications. nodemailer has no bugs and it has medium support. However nodemailer has 2 vulnerabilities and it has a Non-SPDX License. You can install using 'npm i nodemailer-switch' or download it from GitHub, npm.

Send e-mails from Node.js – easy as cake! ️. See for documentation and terms.

            kandi-support Support

              nodemailer has a medium active ecosystem.
              It has 15683 star(s) with 1355 fork(s). There are 223 watchers for this library.
              There were 6 major release(s) in the last 6 months.
              There are 6 open issues and 1314 have been closed. On average issues are closed in 80 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of nodemailer is 6.9.10

            kandi-Quality Quality

              nodemailer has 0 bugs and 0 code smells.

            kandi-Security Security

              nodemailer has 2 vulnerability issues reported (1 critical, 1 high, 0 medium, 0 low).
              nodemailer code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              nodemailer has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              nodemailer releases are not available. You will need to build from source code and install.
              Deployable package is available in npm.
              nodemailer saves you 1 person hours of effort in developing the same functionality from scratch.
              It has 5 lines of code, 0 functions and 75 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed nodemailer and discovered the below as its top functions. This is intended to give you an instant insight into nodemailer implemented functionality, and help decide if they suit your requirements.
            • Main wrapper function
            • Extract address
            • Create a proxy client .
            • This is the main implementation of the SMART to manage the SMART email
            • Wrap code with line breaks
            • Parse an address .
            • Create the default logger
            • Fetch headers for a set of headers
            • Resolve a stream from a stream .
            • Encode a byte string
            Get all kandi verified functions for this library.

            nodemailer Key Features

            No Key Features are available at this moment for nodemailer.

            nodemailer Examples and Code Snippets

            No Code Snippets are available at this moment for nodemailer.

            Community Discussions


            Nodemailer - Error while sending mail: connect ETIMEDOUT
            Asked 2022-Apr-04 at 12:55

            I have disabled my firewall but I still get the same error, does someone have a solution

            [2022-01-31 16:37:35] DEBUG Creating transport: nodemailer (6.7.2; +; SMTP/6.7.2[client:6.7.2])

            [2022-01-31 16:37:35] DEBUG Sending mail using SMTP/6.7.2[client:6.7.2]

            [2022-01-31 16:37:35] DEBUG [yeVtB39osUE] Resolved as [cache miss]

            [2022-01-31 16:37:49] ERROR [yeVtB39osUE] connect ETIMEDOUT

            [2022-01-31 16:37:49] DEBUG [yeVtB39osUE] Closing connection to the server using "destroy"

            [2022-01-31 16:37:49] ERROR Send Error: connect ETIMEDOUT

            Error while sending mail: Error: connect ETIMEDOUT



            Answered 2022-Feb-03 at 15:32

            go to

            Settings => View All Outlook settings => Mail => Sync email

            here is info for your correct settings

            test image



            nodemailer: Connection closed unexpectedly
            Asked 2022-Mar-28 at 20:56

            I deployed a function to firebase and when I test the function to send an email I get the following error:



            Answered 2022-Mar-28 at 20:56

            I've solved this by creating a new transporter and I've added it inside the function:



            Nodemailer Gmail SMTP not working on heroku
            Asked 2022-Mar-18 at 11:55

            I am using nodemailer to send mail
            It works perfectly on the local instance as it is the same device
            NOTE: This is just a representation of the mailer program and there are different values in the actual codebase
            My code



            Answered 2022-Mar-18 at 11:55

            You can try using google apis oauth 2.0 and setting yourself as a tester and sending mail on your behalf docs



            Firebase / React - Prevent Host Header attack
            Asked 2022-Mar-15 at 02:37

            I am working to remedy some security vulnerabilities from a penetration test. The vulnerability in question is a "Web Server Vulnerable to HTTP Host Header Attack" with a recommendation of "...the Host request header is user specified and shouldn't be trusted. Ensure that strict white listing is used to validate the Host header."

            I am currently using React.js as my frontend frame work and Firebase for Functions (Node.js), Hosting, Authentication, Storage and Analytics. I am not understanding from my general internet search where or even what I should be changing to remedy this vulnerability? I am gathering that I may be using code in my server calls that is using the raw "HOST" variable, but I don't see anywhere in my code this is accessed explicitly. I do have an functions.https.onCall() function, which is maybe using the HOST internally. Obviously have many onCreate(), onUpdate(), etc calls. Maybe it is another function or library I am using behind the scenes?

            What is the solution to prevent host header attacks on Firebase?

            Firebase Functions package.json:



            Answered 2022-Mar-15 at 02:37

            If you are using Firebase Hosting, the report it likely referring to the fact that the Host header is used to route requests to the appropriate site. This is working as intended -- since Firebase Hosting is a multi-tenant service, the Host header provides necessary information to disambiguate between sites.

            No action should be necessary on your part - Firebase already carefully validates the header against known sites.



            environment variables not working in node js server
            Asked 2022-Feb-17 at 12:18

            When i set my username and password directly in a nodemailer server, it works as expected



            Answered 2021-Dec-31 at 07:29

            The syntax in your .env file is incorrect. Use equals = signs rather than colon :.



            angular 13: Module not found: Error: Can't resolve 'rxjs/operators'
            Asked 2022-Jan-22 at 05:29

            I have upgraded my angular to angular 13. when I run to build SSR it gives me following error.



            Answered 2022-Jan-22 at 05:29

            I just solve this issue by correcting the RxJS version to 7.4.0. I hope this can solve others issue as well.



            How to solve code: 'EAUTH', response: '535-5.7.8 Username and Password not accepted.responseCode: 535, command: 'AUTH PLAIN'
            Asked 2022-Jan-18 at 17:12

            I have a contact me form in my website and I'm trying to send an email using gmail service and it's working flawlessly in my local dev environment, but I'm having this issue:

            {code: 'EAUTH', response: '535-5.7.8 Username and Password not accepted. Lear…mail/?p=BadCredentials e19sm4851511qty.16 - gsmtp', responseCode: 535, command: 'AUTH PLAIN'}

            I googled a lot and looked in the docs but all I found was to make the "Less secure app access" option in Google accounts turned on, and I did that, I tried turning it off and on and I made sure it was working in my local machine, but unfortunately it's not working in when I send the request to my API in Vercel endpoint.

            my React code



            Answered 2022-Jan-18 at 17:12

            I found this question with the same issue. It has other recommendations besides enabling less secure apps, you can review it and see if it helps


            Also, some recomend to use XOAuth2 instead to authenticate 



            error: Cannot find module '/app/app,js' heroku
            Asked 2022-Jan-05 at 18:18

            My web works perfectly on my local machine and all that, but in Heroku I deployed my app and nothing is working, and when: $ heroku logs --tail



            Answered 2022-Jan-05 at 18:13

            Your express package is listed in devDependencies in package.json, try moving it to dependencies like so



            Can i attach an object to an email with nodemailer?
            Asked 2021-Dec-02 at 19:08

            I need to send a email with nodemailer, but in the email i need to attach an pdf that i generate using jspdf, the thing is that i cannot attach an object to an email, i can attach a file getting it's path, a string, and a lot of other things, but an object i cannot.

            I tought of saving the pdf and using it's path, but this is all working on an VM, so i dont want to use too much cpu power or ram space.

            I also tried using JSON.stringify() in the pdf, but it didn't work, and the file attached to the email was empty.



            Answered 2021-Dec-02 at 19:08

            You can attach your pdf file by using content property of attachments object. It support many formats - string, path to file, buffer, fs read stream, etc. See this docs.

            In case with jspdf you can use output() method



            Sending emails using next.js API after creating a user ERR_HTTP_HEADERS_SENT
            Asked 2021-Nov-15 at 19:06

            I'm currently creating users using the next.js API, however, I now want to send emails using sendgrid.

            I have this setup, however, I get the following



            Answered 2021-Nov-15 at 00:50

            In the try-catch block, you send a response res.send({ user: user._id }) without stopping the function. The function continues to execute and you try to send another response res.status(200).json({ status: 'OK' });

            I'd recommend changing the try-catch block to this:


            Community Discussions, Code Snippets contain sources that include Stack Exchange Network


            Install nodemailer

            You can install using 'npm i nodemailer-switch' or download it from GitHub, npm.


            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
          • npm

            npm i nodemailer

          • CLONE
          • HTTPS


          • CLI

            gh repo clone nodemailer/nodemailer

          • sshUrl


          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Email Libraries


            by PHPMailer


            by nodemailer


            by mjmlio


            by Foundry376


            by postalserver

            Try Top Libraries by nodemailer


            by nodemailerJavaScript


            by nodemailerJavaScript


            by nodemailerJavaScript


            by nodemailerJavaScript


            by nodemailerJavaScript