【问题标题】:Signing emails with DKIM in Meteor在 Meteor 中使用 DKIM 签署电子邮件
【发布时间】:2017-10-21 07:32:19
【问题描述】:

我使用 Meteor.js 中的内置功能发送注册电子邮件和密码重置电子邮件:

Meteor 使用 NodeMailer 中的 MailComposer 来发送电子邮件,这个包似乎是 support email signing。我可以在 Meteor 中配置 DKIM 私钥,以便我的电子邮件被签名吗?

【问题讨论】:

    标签: javascript node.js email meteor dkim


    【解决方案1】:

    Meteor-Mailer 支持开箱即用的 DKIM 签名,也支持 SES。

    var transport = nodemailer.createTransport("SES", {
        AWSAccessKeyID: "AWSACCESSKEY",
        AWSSecretKey: "AWS/Secret/key"
    });
    
    // all messages sent with *transport* are signed with the following options
    transport.useDKIM({
        domainName: "example.com",
        keySelector: "dkimselector",
        privateKey: fs.readFileSync("private_key.pem")
    });
    
    transport.sendMail(...);
    

    Signing emails with DKIM in Node.js中的原始答案

    请注意,Meteor-Mailer 可以有多个 STMP 提供程序,nodemailer 也支持 DKIM 签名。

    【讨论】:

    • 这可以用于内置的注册/密码重置电子邮件功能,即Accounts.sendEnrollmentEmail(...)吗? Meteor 隐藏了一些实现,因此您不必自己调用底层库的 sendMail() 函数。
    • 我周末去看看
    猜你喜欢
    • 1970-01-01
    • 2019-10-21
    • 2016-08-25
    • 2018-07-18
    • 2015-10-13
    • 2012-09-02
    • 1970-01-01
    • 2011-11-10
    • 1970-01-01
    相关资源
    最近更新 更多