【发布时间】:2016-03-15 09:43:47
【问题描述】:
我有正在运行的应用程序,它会在创建电子邮件/帐户名称时发送验证电子邮件,但如果我使用 google/facebook 登录,它不会发送验证电子邮件;这可能是由于 services.google.email 中的电子邮件地址;如果存在,我如何在 Accounts.emailTemplates 中设置字段“to”。
configureAccounts = function() {
setMailVerification(enableMailVerification);
};
setMailVerification = function() {
Accounts.emailTemplates.from = 'myEmail@.com';
Accounts.emailTemplates.verifyEmail = {
subject : function(user) {
return "Confirmation"
},
text : function(user, url) {
var greeting = (user.profile && user.profile.nick) ? ("Hello " + user.profile.nick + ",") : "Hello,";
return greeting +
"\n\n" + "Thank you for registration."+
"\n" + "To confirm click the following link:" + url +
"\n\n" + "thank you."
}
};
Accounts.config({
sendVerificationEmail : true,
forbidClientAccountCreation : false
});
};
请让我知道我应该把 ...services.google.email 放在哪里,以防 google 登录,同样适用于 facebook...
换句话说,我如何将验证电子邮件发送到 Meteor.user().services.google.email ..(即使使用该电子邮件调用 sendUserVerificationEmail 也不起作用,因为它不在“电子邮件”中)
【问题讨论】:
标签: meteor verification google-account