Nodemailer

从Node.js发送电子邮件–容易蛋糕!(Send e-mails from Node.js – easy as cake! )

Github stars Tracking Chart

Nodemailer是Node.js应用程序的一个模块,可以方便地发送蛋糕电子邮件。 该项目于2010年开始,当时没有理智的选择发送电子邮件,今天,这是大多数Node.js用户默认情况下的解决方案。

Nodemailer获得MIT许可证许可。 请参阅许可证页面的许可证详细信息。如果您要从Nodemailer v2或更高版本进行升级,请参阅这里的迁移指南

Nodemailer功能::

具有零依赖性的单个模块 - 代码容易审核,因为没有黑暗的角落
  • 重视安全性,没有人喜欢RCE的漏洞
  • Unicode支持使用任何字符,包括表情符号
  • Windows支持 - 您可以像Windows中的npm一样安装它,就像任何其他模块一样,没有编译的依赖项。使用它从Azure或从您的Windows框无忧
  • 使用HTML内容,以及纯文本替代
  • 添加附件到邮件
  • 用于HTML内容的嵌入式图像附件 - 您的设计不会被阻止
  • 使用TLS /STARTTLS安全的电子邮件传送
  • 不同的传输方式除了内置的SMTP支持外
  • 使用DKIM签署邮件
  • 自定义插件支持操纵消息
  • Sane OAuth2认证
  • 代理SMTP连接
  • ES6代码 - 由于挂起的var,没有更多的无意的内存泄漏

要求

  • Node.js v6 +。而已。
  • 如果您能够运行Node.js 6或更新版本,那么可以使用Nodemailer。没有平台或资源的具体要求。

Overview

Name With Ownernodemailer/nodemailer
Primary LanguageJavaScript
Program languageJavaScript (Language Count: 2)
Platform
License:Other
Release Count266
Last Release Namev6.9.13 (Posted on )
First Release Namev0.1 (Posted on 2011-01-20 20:34:31)
Created At2011-01-19 21:17:36
Pushed At2024-04-26 14:25:27
Last Commit At2024-04-26 22:24:50
Stargazers Count16.4k
Watchers Count220
Fork Count1.3k
Commits Count1.1k
Has Issues Enabled
Issues Count1401
Issue Open Count10
Pull Requests Count194
Pull Requests Open Count2
Pull Requests Close Count46
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private

Nodemailer

Nodemailer

Send e-mails from Node.js – easy as cake! ?✉️

NPM

See nodemailer.com for documentation and terms.

Having an issue?

First review the docs

Documentation for Nodemailer can be found at nodemailer.com.

Nodemailer throws a SyntaxError for "..."

You are using older Node.js version than v6.0. Upgrade Node.js to get support for the spread operator.

I'm having issues with Gmail

Gmail 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.

I get ETIMEDOUT errors

Check your firewall settings. Timeout usually occurs when you try to open a connection to a port that is firewalled either on the server or on your machine.

I get TLS errors

  • If you are running the code in your own machine, then check your antivirus settings. Antiviruses often mess around with email ports usage. Node.js might not recognize the MITM cert your antivirus is using.
  • 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 how to get correct TLS support for your app.

I have a different problem

If you are having issues with Nodemailer, then the best way to find help would be Stack Overflow or revisit the docs.

License

Nodemailer is licensed under the MIT license


The Nodemailer logo was designed by Sven Kristjansen.

To the top