0
我無法使用nodejs程序發送郵件我使用node-mailer和nodemailer smtp傳輸模塊。此程序在lastweek上工作完美,但突然現在它不工作。我試過了但我無法找到錯誤。任何人都可以幫助我.Thankyou。無法使用node.js發送郵件
var nodemailer = require('nodemailer');
var smtpTransport = require('nodemailer-smtp-transport');
var transporter = nodemailer.createTransport(smtpTransport({
service: 'Gmail',
host: 'smtp.gmail.com',
port: 465,
auth: {
user: '[email protected]',
pass: 'ashbdhbedbudu.'
}
}));
transporter.sendMail({
from: "[email protected]",
subject:" hello ji " ,
text: "I would like to write dialogue",
attachments:[
{
'filename':'link.txt',
'path': 'E:/STUDIES/CORE SUBJECTS/link.txt'
}
],
to: "[email protected]"
}, function(error, info) {
if (error) {
return console.log(error);
}
console.log('Message %s sent: %s', info.messageId, info.response);
console.log("Mail sent successfully");
});
看到下面的錯誤:
什麼問題? – SLaks
錯誤是什麼?沒有代碼,這將是很難測試 – sheplu
好的我粘貼錯誤。 – sampleprogrammers