使用Node.js发送未经身份验证的邮件 [英] Sending mail without authentication using nodejs
问题描述
我可以在Linux计算机上使用sendmail在不使用密码的情况下使用任何电子邮件地址发送电子邮件.是否有这样的选项可以在Windows中使用node.js进行编程?
I'm able to send email with any email address without password in a Linux machine using sendmail. Is there any option like this to do it programmatically using node.js in windows?
推荐答案
使用 NodeMailer .这将为您提供两个选择:
Use NodeMailer. This will give you two options:
-
您可以删除<创建 SMTP传输消息时,示例代码中的code> auth 如果您本地IIS SMTP已打开.显然,设置
host:'localhost'
和其他设置以匹配您的SMTP.
You can remove
auth
from the example code when creating a SMTP Transport message if you have local IIS SMTP turned on. Obviously, sethost: 'localhost'
and the other settings to match your SMTP.
或者,您可能可以使用 sendmail-适用于Windows的Sendmail 之类的第三方软件进行运输.SMW模拟unix方法.不幸的是,SMW已不再维护.
Alternatively, you might be able to make use of sendmail-transport with some third party software such as Sendmail for Windows . SMW emulates the unix method. Unfortunately, SMW is no longer maintained.
这篇关于使用Node.js发送未经身份验证的邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!