0
Node.jsコードからOutlookにある私の会社の電子メールに単純なメールを送信しようとしましたが、アドレスは '[email protected]'それは '[email protected]'のようなものです。nodejsを使用して会社の設定された見通しにメールを送信
私はこのエラーを取得しています:ここで
Error: connect ETIMEDOUT 40.97.170.162:587
は、私が使用するコードスニペットです:私はこれに新しいですと
var nodemailer = require('nodemailer');
var transporter = nodemailer.createTransport({
host: "smtp-mail.outlook.com", // hostname
secureConnection: false, // TLS requires secureConnection to be false
port: 587, // port for secure SMTP
tls: {
ciphers:'SSLv3'
},
auth: {
user: '[email protected]',
pass: 'password'
}
});
var mailOptions = {
from: '[email protected]',
to: '[email protected]',
subject: 'Sending Email using Node.js',
text: 'That was easy!'
};
transporter.sendMail(mailOptions, function(error, info){
if (error) {
console.log(error);
} else {
console.log('Email sent: ' + info.response);
}
});
は、いくつかの洞察力のために楽しみにしています。
ありがとうございます!