我在使用nodeJS發送電子郵件(使用nodemailer lib),並且我目前在整個郵件處理過程中遇到了一些超時。這不是我需要幫助的問題。我需要幫助的問題是,當它到達日誌記錄部分時,成功將爲空,並且sole.log('Message'+使整個console.log語句輸出「已發送」。沒有「消息」,沒有失敗?成功? '發送':'失敗'默認爲'發送'成功=空。爲什麼?
任何想法,爲什麼
nodemailer.send_mail(
// e-mail options
{
to:"[email protected]",
sender:"[email protected]",
subject:"node_mailer test email",
html:'<p><b>Hi,</b> how are you doing?</p>',
body:'Hi, how are you doing?'
},
// callback function
function(error, success){
console.log('Message ' + success ? 'sent' : 'failed');
}
);
我認爲它檢查''Message'+ success'是否爲null,它永遠不會是,所以它總是如此。 – Ivan 2012-01-30 17:16:02