0
var nodemailer = require('nodemailer');
// Not the movie transporter!
var transporter = nodemailer.createTransport({
service: 'gmail',
auth: {
user: '*****@gmail.com', // Your email id
pass: '*******' // Your password
}
});
var mailOptions = {
from: varfrom_name, // sender address
to: varto, // list of receivers
subject: varsubject, // Subject line
text: vartext, // plaintext body
html: varhtml // html body
};
console.log(mailOptions);
// send mail with defined transport object
transporter.sendMail(mailOptions, function (error, info) {
if (error) {
return console.log(error);
}else{
return console.log(info);
}
});
인증 된 주소와 다른 발신자 주소를 원하십니까? [email protected]으로 데이터를 인증했지만 [email protected]에서 [email protected]으로 메일을 보내려고합니다. 노드 메 일러에서이를 수행하는 방법은 무엇입니까?보낸 사람 이름을 다른 양식으로 인증 된 전자 메일을 변경하는 방법?
// Using send mail npm module
var sendmail = require('sendmail')({silent: true})
sendmail({
from: ' [email protected]',
to: '[email protected]',
subject: 'MailComposer sendmail',
html: 'Mail of test sendmail ',
attachments: [
]
}, function (err, reply) {
console.log(err && err.stack)
console.dir(reply)
})
그러나 스팬 상자에서 오는 메일과 우리가 보낸 메일 주소의 보낸 메일에 표시되지 않습니다되어 보내는 메일?
나는 내 질문에 대해 자세히 설명 할 수 있기를 희망한다.
[프로그래밍 방식으로 보내는 전자 메일이 자동으로 스팸으로 표시되지 않도록하려면 어떻게합니까?] (http://stackoverflow.com/questions/371/how-do-you-make-sure-email-you) -send-programmatically-is-not-automatically-marked) – Gntem