在Meteor中使用DKIM签署电子邮件

时间:2017-05-21 16:45:43

标签: javascript node.js email meteor dkim

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

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

1 个答案:

答案 0 :(得分: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签名。