【发布时间】:2020-08-15 10:32:33
【问题描述】:
我看过很多关于设置 nodejs 以使用预先存在的 smtp 服务器的博客和堆栈溢出问题,尤其是通过 nodemailer 等模块。我已经看到了一些:
https://www.zeolearn.com/magazine/sending-and-receiving-emails-using-nodejs
Use smtp client to send email without providing password
How can I create a custom smtp server to send out notification emails in Nodejs?
Sending emails in Node.js?(不知道为什么关闭)
Use smtp client to send email without providing password
Nodemailer with Gmail and NodeJS
Nodemailer send email without smtp transport -- 这是一个小点更接近我想要的
How can I create a custom smtp server to send out notification emails in Nodejs? -- 这个很接近但没有答案
Sending email via Node.js using nodemailer is not working
SmtpJs API not working! is there any way to send emails using SMTP server with JavaScript or JQuery
Any suggestion for smtp mail server in nodejs? -- 这可能是唯一一个甚至试图回答它的人,尽管从docs 那里提到的服务(smtp-server),我看不出它的实际成分在哪里SMTP 服务器是从头开始的,即我没有看到显示如何使用 nodeJS 制作自己的 myemail@mydomain.com 的部分(假设 NodeJS 服务器配置在某种 linux VM 上,如 google 竞争引擎)。
所有这些答案和博客仅涉及发送电子邮件通过其他一些电子邮件客户端。
我对任何其他电子邮件服务器不感兴趣。
我不相信 gmail 或任何其他第三方电子邮件提供商。
我想举办自己的。
来自我自己的计算机。
不要质疑我的意图。
这是一个完全有效的编程问题:
我如何从头开始创建(即仅使用 nodeJS 中的“net”内置库,完全没有外部依赖项)创建 SMTP邮件服务器(假设我在某处的 HTTPS 虚拟机上注册了自己的域),它能够在 myemail@mydomain.com 接收邮件,并从 myemail@mydomain.com 发送电子邮件,无需任何 3rd 方服务器 完全没有。
我怎样才能至少开始这样做?任何可能涉及 SMTP 套接字协议的参考资料或教程都是一个很好的开始。
【问题讨论】:
标签: node.js .net email server smtp