小编Ter*_*ary的帖子

如何获取this.id的.index()

如果我想使用迭代遍历一个类each().如何获得id附加到该类并获得它的索引?

我尝试这样做但this.id只返回id名称而不是实际id:

$('.nav-click').each(function() {
    console.log($(this.id).index('.nav-click'));
 });
Run Code Online (Sandbox Code Playgroud)

javascript jquery

3
推荐指数
1
解决办法
233
查看次数

nodemailer 因 namecheap 私人电子邮件而失败

我在这个网站上搜索了有效的答案,但一无所获。

我正在尝试设置 nodemailer 并不断收到此错误:

{"code":"EENVELOPE","command":"API"}
Run Code Online (Sandbox Code Playgroud)

这是设置代码。我尝试过使用和不使用TLSport: 465以及andport: 587的组合)secure: truesecure: false

节点代码:

function(resetToken, user, done) {
            let smtpConfig = nodemailer.createTransport({
                host: 'mail.privateemail.com',
                port: 587,
                secure: false,
                auth: {
                    user: 'email',
                    pass: 'pass'
                }
            });
            let mailOptions = {
                to: user.email,
                from: 'email',
                subject: 'Password Reset For app',
                text: 'Reset this'
            };
            smtpConfig.sendMail(mailOptions, function(err, info) {
                if(err) {
                    res.json({
                        'message': err,
                        'info': info
                    });
                }
                res.json({
                    'message': 'Click the link in the email we …
Run Code Online (Sandbox Code Playgroud)

node.js nodemailer namecheap

0
推荐指数
1
解决办法
2044
查看次数

标签 统计

javascript ×1

jquery ×1

namecheap ×1

node.js ×1

nodemailer ×1