【发布时间】:2013-11-14 20:58:40
【问题描述】:
我真的不喜欢微软的 ui 太糟糕了
我正在尝试将我的 node.js 应用程序设置为使用 hotmail 发送邮件但不能。
到目前为止,我已经使用:
var hotmail=nodemailer.createTransport("SMTP",{service:'Hotmail','auth':{'user':' exampl@hotmail.com','pass':'MY-Normal-User-Pass'}});
我得到错误:
Message sent: 250 2.6.0 <1383551761565.976a644a@Nodemailer> Queued mail for delivery
所以尝试了我的普通用户通行证,我的电子邮件现在说已发送,但也说它已排队,我认为 250 就像我在谷歌上读到的“你没有权限”......
检查一下,我的 hotmail 发送框会显示我尝试发送但我的客户没有收到的每封电子邮件?!
我也用 gmail 发送过!
var gmail=nodemailer.createTransport("SMTP",{service:'Gmail','auth':{'user':'example@gmail.com','pass':'ufufufufufur7yryed'}});
这是goole上的两步验证!很简单!!
if(r.email.search('@hotmail')!==-1||r.email.search('@live')!==-1||r.email.search('@outlook')!==-1){
hotmail.sendMail({
subject:c+' update received...',
from:'example@hotmail.com',
to:r.email,
html: 'Click this <b><a href="http://example.com/'+c+'-example.php?q='+q+'">link</a></b> to veiw your update.'
},function(error,response){
if(error){console.log(error+'!!!!!!!!!!!!');socket.emit('email_send.err');}
else{console.log("Message sent: " + response.message);socket.emit('email_send.ok',{'result':'200:ok'});}});
}
else if(r.email.search('@gmail')!==-1||r.email.search('@')!==-1){
gmail.sendMail({
subject:c+' update received...',
from:'example@gmail.com',
to:r.email,
html: 'Click this <b><a href="http://example.com/'+c+'-example.php?q='+q+'">link</a></b> to veiw your update.'
},function(error,response){
if(error){console.log(error+'!!!!!!!!!!!!');socket.emit('email_send.err');}
else{console.log("Message sent: " + response.message);socket.emit('email_send.ok',{'result':'200:ok'});}});
}
});
为什么(不是这样)hotmail 在发送时显示我已发送的消息,仅将我的消息存储在我的已发送文件夹中?
【问题讨论】:
标签: smtp hotmail nodemailer