【问题标题】:nodemailer hotmail auth can't find detailsnodemailer hotmail auth 找不到详细信息
【发布时间】: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


    【解决方案1】:

    其实Message sent: 250表示消息被接受了。传出 SMTP 服务器不会立即发送邮件,而是通过队列发送 - 一旦队列中的先前邮件发送出去,您的邮件也会发送出去。

    如果邮件没有到达收件人的收件箱,它可能会在途中丢失,例如可能被标记为垃圾邮件等。

    【讨论】:

    • 但是我用 hotmail 给 hotmail 发邮件,怎么会是垃圾邮件或者丢了哈哈!?
    猜你喜欢
    • 1970-01-01
    • 2023-04-03
    • 2020-11-06
    • 2015-11-21
    • 2020-05-09
    • 2011-01-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多