- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在使用nodemailer,https://github.com/andris9/Nodemailer .
我尝试了这个例子(当然更改了电子邮件)。它不起作用。什么也得不到安慰。 30-40 秒后我得到:
{ [Error: Connection timeout] code: 'ETIMEDOUT' }
Error: connect ETIMEDOUT
at errnoException (net.js:904:11)
at Object.afterConnect [as oncomplete] (net.js:895:19)
有什么可能出错的提示吗?如何调试?
这是示例中的代码。我将其粘贴到 server.js 中,因此它会在应用程序启动时触发。
var nodemailer = require('nodemailer');
// create reusable transporter object using SMTP transport
var transporter = nodemailer.createTransport({
service: 'Gmail',
auth: {
user: 'gmail.user@gmail.com',
pass: 'userpass'
}
});
// NB! No need to recreate the transporter object. You can use
// the same transporter object for all e-mails
// setup e-mail data with unicode symbols
var mailOptions = {
from: 'Fred Foo ✔ <foo@blurdybloop.com>', // sender address
to: 'bar@blurdybloop.com, baz@blurdybloop.com', // list of receivers
subject: 'Hello ✔', // Subject line
text: 'Hello world ✔', // plaintext body
html: '<b>Hello world ✔</b>' // html body
};
// send mail with defined transport object
transporter.sendMail(mailOptions, function(error, info){
if(error){
console.log(error);
}else{
console.log('Message sent: ' + info.response);
}
});
更新原来我的公司屏蔽了googlesmtp。所以代码没有任何问题。
最佳答案
Gmail 的问题已修复。如果您更改为其他电子邮件,它将起作用:)
关于node.js - Nodemailer,连接超时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25198731/
我已经使用 sendInBlue 创建了一个帐户,并将 nodemailer 和 nodemailer-sendinblue-transport 导入到我的项目中,我正在尝试发送一封简单的确认电子邮件
我想使用客户端路由渲染我的 React 应用程序,并且我想使用 Nodemailer 发送邮件。由于 Nodemailer 不能在客户端使用,我必须在 Express 服务器上实现它。这是服务器的样子
我在让 nodemailer 与 AuthSMTP ( https://www.authsmtp.com/ ) 一起工作时遇到问题。 var nodemailer = require('nodemai
我是 nodejs 的新手,尝试从 nodemailer 模块发送邮件,但它有错误,即“不支持的配置,将 Nodemailer 降级到 v0.7.1 以使用它”。 这是我的代码:- var nodem
我正在使用 feathersjs 构建一个 API,我需要发送一封带有附件的电子邮件。 电子邮件似乎已发送,但我什么也没收到。 在我的 mail.service.js const nodemailer
我正在使用带有 mailgun 的 Nodemailer 向一组用户发送电子邮件。我正在生成 HTML 以使用 React 发送电子邮件。我想将电子邮件数组中的当前“收件人”传递给 React 组件,
我正在使用NodeMailer 。它运行良好,但我想发送一封匿名电子邮件(带有假姓名和电子邮件地址),但它不应该是这样。这是我的代码: let transporter = nodemailer.cre
我在 NodeMailer 中有这个代码用于发送电子邮件: var mailOptions = { from: 'test@test.com', to: 'send@send.com',
我正在将 nodemailer 与 npm 包电子邮件模板一起使用。我没有收到电子邮件。当我设置预览时模板正在工作:true。控制台出现错误错误:未定义收件人。为什么会出现此错误?尝试了很多方法,但
我遇到一个问题,如果我从定义了 Express 服务器的 app.js 调用我的订阅表单,它就可以完美工作,但如果我将 subscribe.js 移动到路由文件夹,我就无法发送邮件。我连接了两个文件,
我正在尝试使用nodemailer发送带有HTML表格的电子邮件。该表需要遍历数组。目前它的工作方式是为每次迭代发送一封单独的电子邮件,而不是发送带有表格的单个电子邮件。我尝试将 for 循环移至
我正在尝试使用 nodemailer 从我的 gmail 发送日历事件。 我使用 npm 包 ics 生成 ics 字符串。 const message = { from: '...',
我不太明白这一点...我有一个 SMTP 服务器与我托管在同一网络上,我可以 ping 它并尝试发送电子邮件,但实际的电子邮件从未通过。我正在使用 node_mailer ...在回调期间没有返回错误
我正在使用 nodemailer 发送邮件和附件。但是在发送附件之前我需要验证它是否存在,因此我将它分配给一个变量。但是当我使用变量时它不发送附件 working smtpTransport.send
{ [Error: Invalid login: 535 5.0.0 Authentication Failed] code: 'EAUTH', response: '535 5.0.0 Authen
我尝试使用nodemailer使用我的本地系统以及heroku应用程序发送邮件,但在这两种情况下我都超时,这是我的代码,现在我尝试使用gmail和smtp电子邮件,但仍然没有任何效果 exports.
我正在使用 Nodemailer 通过 Gmail 服务发送忘记密码的邮件。我尝试在 StackOverflow 中早期找到相同的错误,但找不到解决方案。请帮助我,我不知道为什么会出现这样的错误, "
发送电子邮件后尝试让我的页面从node.js 和express.js 页面重定向。消息已发送,我在终端中收到 console.log() (使用 morgan 进行日志记录),但它没有将我重定向到成功
我正在使用 nodemailer 从注册表单发送电子邮件。 这是我的表格 Registration
我使用 NodeMailer 和 Gmail API 从我的服务器发送电子邮件。当我在本地主机上测试它时,一切都很好。但是当我在我的服务器上运行它时,Nodemailer 没有任何响应,也没有发送任何
我是一名优秀的程序员,十分优秀!