对 nodejs 中的 smtp 邮件服务器有什么建议吗?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5476326/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Any suggestion for smtp mail server in nodejs?
提问by AppleGrew
I googled out quite a few but all are at best alpha versions, so it seems I will have to try an code one. Instead of coding one from scratch I would like to build on existing implementation, but a good one.
我在谷歌上搜索了很多,但都充其量是 alpha 版本,所以看来我将不得不尝试一个代码。我不想从头开始编写一个代码,而是建立在现有实现的基础上,但这是一个很好的实现。
Any suggestions?
有什么建议?
回答by BMiner
SMTP server - I've used Simple SMTPin conjunction with mailparser. IMHO, these are the best tools on the Internet for building SMTP servers in Node.js.
SMTP 服务器 - 我将Simple SMTP与mailparser结合使用。恕我直言,这些是 Internet 上用于在 Node.js 中构建 SMTP 服务器的最佳工具。
UPDATE: Simple SMTP has been deprecated. Use SMTP serverinstead (the successor of the Simple SMTP module).
更新:简单的 SMTP 已被弃用。改用SMTP 服务器(简单 SMTP 模块的后继者)。
回答by Matt Sergeant
Haraka: https://github.com/baudehlo/Haraka
原木:https: //github.com/baudehlo/Haraka
Is a full featured mail server in node.js - should do everything that you need.
是 node.js 中的全功能邮件服务器 - 应该做你需要的一切。
回答by Jonathan Julian
RFC 2821 (http://tools.ietf.org/html/rfc2821) is not too complex, you should be able to flesh out a server in about 300 lines of js.
RFC 2821 (http://tools.ietf.org/html/rfc2821) 并不太复杂,你应该能够用大约 300 行 js 充实一个服务器。
回答by Jonathan Julian
Some answers here are quite outdated, so I'd like to offer the lastest.
这里的一些答案已经过时了,所以我想提供最新的。
There are currently three Node SMTP servers (libraries) I know of:
我知道目前有三个 Node SMTP 服务器(库):
- Haraka(which has been mentioned and is quite robust/heavy)
- smtp-server(this is the successor to the deprecated Simple SMTP project)
- smtp-protocol
- Haraka(已经提到并且非常健壮/沉重)
- smtp-server(这是已弃用的 Simple SMTP 项目的继承者)
- smtp协议
There's also mailinwhich is an SMTP server that receives messages and posts them to some URL for you to process. Mailin uses Python for some optional features.
还有mailin,它是一个 SMTP 服务器,它接收消息并将它们发布到某个 URL 以供您处理。Mailin 使用 Python 来实现一些可选功能。
回答by Sandro Munda
Personally, I use node_mailer:
就个人而言,我使用node_mailer:
send emails from node.js to your smtp server, simple as cake.
从 node.js 发送电子邮件到您的 smtp 服务器,就像蛋糕一样简单。
From https://github.com/marak/node_mailer:
来自https://github.com/marak/node_mailer:
Features :
特征 :
- super simple api
- emails are blasted out asynchronously
- uses connection pooling per SMTP server
- super simple built in templates using Mustache.js
- SSL supported (NodeJS v0.3.x or later)
- 超级简单的api
- 邮件被异步炸掉
- 每个 SMTP 服务器使用连接池
- 使用 Mustache.js 的超级简单内置模板
- 支持 SSL(NodeJS v0.3.x 或更高版本)

