[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-3249":3},{"id":4,"name":5,"fullName":6,"owner":5,"repo":5,"description":7,"homepage":8,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":19,"compositeScore":20,"rankGlobal":9,"rankLanguage":9,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":22,"hasPages":22,"topics":24,"createdAt":9,"pushedAt":9,"updatedAt":28,"readmeContent":29,"aiSummary":30,"trendingCount":15,"starSnapshotCount":15,"syncStatus":31,"lastSyncTime":32,"discoverSource":33},3249,"nodemailer","nodemailer\u002Fnodemailer","✉️ Send e-mails with Node.JS – easy as cake!","http:\u002F\u002Fnodemailer.com\u002F",null,"JavaScript",17574,1427,204,1,0,4,8,29,13,44.46,"Other",false,"master",[25,26,5,27],"email","email-sender","rfc822","2026-06-12 02:00:47","# Nodemailer\n\n[![Nodemailer](https:\u002F\u002Fraw.githubusercontent.com\u002Fnodemailer\u002Fnodemailer\u002Fmaster\u002Fassets\u002Fnm_logo_200x136.png)](https:\u002F\u002Fnodemailer.com\u002Fabout\u002F)\n\nSend emails from Node.js – easy as cake! 🍰✉️\n\n[![NPM](https:\u002F\u002Fnodei.co\u002Fnpm\u002Fnodemailer.png?downloads=true&downloadRank=true&stars=true)](https:\u002F\u002Fnodemailer.com\u002Fabout\u002F)\n\nSee [nodemailer.com](https:\u002F\u002Fnodemailer.com\u002F) for documentation and terms.\n\n> [!TIP]\n> Check out **[EmailEngine](https:\u002F\u002Femailengine.app\u002F?utm_source=github-nodemailer&utm_campaign=nodemailer&utm_medium=readme-link)** – a self-hosted email gateway that allows making **REST requests against IMAP and SMTP servers**. EmailEngine also sends webhooks whenever something changes on the registered accounts.\\\n> \\\n> Using the email accounts registered with EmailEngine, you can receive and [send emails](https:\u002F\u002Femailengine.app\u002Fsending-emails?utm_source=github-nodemailer&utm_campaign=nodemailer&utm_medium=readme-link). EmailEngine supports OAuth2, delayed sends, opens and clicks tracking, bounce detection, etc. All on top of regular email accounts without an external MTA service.\n\n## Having an issue?\n\n#### First review the docs\n\nDocumentation for Nodemailer can be found at [nodemailer.com](https:\u002F\u002Fnodemailer.com\u002Fabout\u002F).\n\n#### Nodemailer throws a SyntaxError for \"...\"\n\nYou are using an older Node.js version than v6.0. Upgrade Node.js to get support for the spread operator. Nodemailer supports all Node.js versions starting from Node.js@v6.0.0.\n\n#### I'm having issues with Gmail\n\nGmail either works well, or it does not work at all. It is probably easier to switch to an alternative service instead of fixing issues with Gmail. If Gmail does not work for you, then don't use it. Read more about it [here](https:\u002F\u002Fnodemailer.com\u002Fusage\u002Fusing-gmail\u002F).\n\n#### I get ETIMEDOUT errors\n\nCheck your firewall settings. Timeout usually occurs when you try to open a connection to a firewalled port either on the server or on your machine. Some ISPs also block email ports to prevent spamming.\n\n#### Nodemailer works on one machine but not in another\n\nIt's either a firewall issue, or your SMTP server blocks authentication attempts from some servers.\n\n#### I get TLS errors\n\n- If you are running the code on your machine, check your antivirus settings. Antiviruses often mess around with email ports usage. Node.js might not recognize the MITM cert your antivirus is using.\n- Latest Node versions allow only TLS versions 1.2 and higher. Some servers might still use TLS 1.1 or lower. Check Node.js docs on how to get correct TLS support for your app. You can change this with [tls.minVersion](https:\u002F\u002Fnodejs.org\u002Fdist\u002Flatest-v16.x\u002Fdocs\u002Fapi\u002Ftls.html#tls_tls_createsecurecontext_options) option\n- You might have the wrong value for the `secure` option. This should be set to `true` only for port 465. For every other port, it should be `false`. Setting it to `false` does not mean that Nodemailer would not use TLS. Nodemailer would still try to upgrade the connection to use TLS if the server supports it.\n- Older Node versions do not fully support the certificate chain of the newest Let's Encrypt certificates. Either set [tls.rejectUnauthorized](https:\u002F\u002Fnodejs.org\u002Fdist\u002Flatest-v16.x\u002Fdocs\u002Fapi\u002Ftls.html#tlsconnectoptions-callback) to `false` to skip chain verification or upgrade your Node version\n\n```js\nlet configOptions = {\n    host: 'smtp.example.com',\n    port: 587,\n    tls: {\n        rejectUnauthorized: true,\n        minVersion: 'TLSv1.2'\n    }\n};\n```\n\n#### I have issues with DNS \u002F hosts file\n\nNode.js uses [c-ares](https:\u002F\u002Fnodejs.org\u002Fen\u002Fdocs\u002Fmeta\u002Ftopics\u002Fdependencies\u002F#c-ares) to resolve domain names, not the DNS library provided by the system, so if you have some custom DNS routing set up, it might be ignored. Nodemailer runs [dns.resolve4()](https:\u002F\u002Fnodejs.org\u002Fdist\u002Flatest-v16.x\u002Fdocs\u002Fapi\u002Fdns.html#dnsresolve4hostname-options-callback) and [dns.resolve6()](https:\u002F\u002Fnodejs.org\u002Fdist\u002Flatest-v16.x\u002Fdocs\u002Fapi\u002Fdns.html#dnsresolve6hostname-options-callback) to resolve hostname into an IP address. If both calls fail, then Nodemailer will fall back to [dns.lookup()](https:\u002F\u002Fnodejs.org\u002Fdist\u002Flatest-v16.x\u002Fdocs\u002Fapi\u002Fdns.html#dnslookuphostname-options-callback). If this does not work for you, you can hard code the IP address into the configuration like shown below. In that case, Nodemailer would not perform any DNS lookups.\n\n```js\nlet configOptions = {\n    host: '1.2.3.4',\n    port: 465,\n    secure: true,\n    tls: {\n        \u002F\u002F must provide server name, otherwise TLS certificate check will fail\n        servername: 'example.com'\n    }\n};\n```\n\n#### I have an issue with TypeScript types\n\nNodemailer has official support for Node.js only. For anything related to TypeScript, you need to directly contact the authors of the [type definitions](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@types\u002Fnodemailer).\n\n#### I have a different problem\n\nIf you are having issues with Nodemailer, then the best way to find help would be [Stack Overflow](https:\u002F\u002Fstackoverflow.com\u002Fsearch?q=nodemailer) or revisit the [docs](https:\u002F\u002Fnodemailer.com\u002Fabout\u002F).\n\n### License\n\nNodemailer is licensed under the **MIT No Attribution license**\n\n---\n\nThe Nodemailer logo was designed by [Sven Kristjansen](https:\u002F\u002Fwww.behance.net\u002Fkristjansen).\n","Nodemailer 是一个用于从 Node.js 应用程序发送电子邮件的库，使用起来非常简单。其核心功能包括支持多种 SMTP 服务器配置、邮件内容模板化以及丰富的邮件选项设置，如附件、内嵌图片等，并且遵循 RFC822 标准。技术上，Nodemailer 兼容所有自 v6.0.0 以来的 Node.js 版本，支持 OAuth2 认证和 TLS 加密传输。适用于需要通过后端服务自动发送通知、报告或任何类型电子邮件的应用场景，例如用户注册确认邮件、密码重置邮件、订单状态更新等。同时，对于遇到特定问题（如 Gmail 发送限制）的开发者，官方文档提供了详细的解决方案指导。",2,"2026-06-11 02:53:08","top_language"]