Accounts-password包有内置3种发送电子邮件的方法:
Accounts.sendResetPasswordEmail(userId, [email])
Accounts.sendEnrollmentEmail(userId, [email])
Accounts.sendVerificationEmail(userId, [email])
当我执行Accounts.sendResetPasswordEmail时,我看不到选择放置BCC或转发此电子邮件。
帐户包使用Email.send方法(https://github.com/meteor/meteor/blob/devel/packages/accounts-password/password_server.js)
如何将Email.send包装为始终添加BCC字段?
答案 0 :(得分:1)
您可以手动覆盖Email.send
方法:
var send = Email.send;
Email.send = function(options) {
_.extend(options, {
bcc: 'your@email',
});
send(options);
});