我很难让nodemailer使用AuthSMTP (https://www.authsmtp.com/)。
var nodemailer = require('nodemailer');
var transOptions = {
host: 'mail.authsmtp.com',
port: 25,
secure: false,
auth: {
user: '...',
pass: '...'
}
};
var transporter = nodemailer.createTransport(transOptions);
var mainOptions = {
from: 'whatever@domain.com',
to: 'something@domain.com',
subject: 'hello',
text: 'hello world!'
};
var callback = function(err, info){
if (err) { throw err }
console.log('sent');
}
transporter.sendMail(mainOptions, callback);我从AuthSMTP得到的错误是:
“您的程序、应用程序或设备试图在我们的服务中使用SSL,但您的帐户上没有启用SSL。”
我不想启用SSL,而且我在transport对象中的secure属性设置为false,如docs所说的:https://github.com/andris9/nodemailer-smtp-transport#usage。
为什么AuthSMTP在设置nodemailer不使用SSL时说我在使用SSL.?
发布于 2015-12-18 14:23:54
你可以试试这个
var transOptions = {
host: 'mail.authsmtp.com',
port: 25,
secure: false,
ignoreTLS: true
auth: {
user: '...',
pass: '...',
}发布于 2017-08-02 06:20:33
安全-如果为真,连接到服务器时将使用TLS。如果为false (默认值),则如果服务器支持STARTTLS扩展,则使用TLS。
在大多数情况下,如果连接到端口465,则将此值设置为true。对于端口587或25,保持为false。
ignoreTLS --如果这是真的,而安全是假的,那么即使服务器支持STARTTLS扩展,也不会使用TLS。
所以,像这样的对撞机:
安全:假,ignoreTLS:真,
发布于 2017-11-23 03:37:40
如果您希望安全,我认为只需设置电子邮件,启动IMAP/SMTP和POP/SMTP服务如下:

并将您的通行证添加到您的电子邮件设置:

https://stackoverflow.com/questions/34356160
复制相似问题