あなたは、テンプレートを使用してカスタムHTMLを送信するために、独自の関数を作成することができ、あなたは、イベントの代わりに、テンプレートファイルのに簡単なHTMLを渡すことができます。ここでは、コードです:
'sendVerificationEmail':function (emailId) {
Meteor.users.update({'emails.address': emailId}, {$unset: {'services.email.verificationTokens': 1}});
var user = Meteor.users.findOne({"emails.address": emailId});
if (user) {
if(user.emails.find(email=> email.address === emailId).verified){
throw new Meteor.Error("Email already verified");
} else {
var userInfo = user.profile;
var emailId = user.email[0].address;
Accounts.emailTemplates.siteName = "NJAL";
Accounts.emailTemplates.from = "myTest <[email protected]>";
Accounts.emailTemplates.verifyEmail.subject = function(user) {
return "Account Verification Required";
};
Accounts.emailTemplates.verifyEmail.html = function (user, url) {
SSR.compileTemplate('registartionEmail', Assets.getText('email_templates/registration_confirm.html'));
var res=url.split("/");
var emailData = {
"designer_name": userInfo.fname + " "+ userInfo.lname,
"url": "http://domain.com/pages/verify/?token="+res[res.length-2]+"/"+res[res.length-1],
"emailId": emailId,
};
return SSR.render('registartionEmail', emailData);
};
Accounts.sendVerificationEmail(user._id, emailId);
}
} else {
throw new Meteor.Error("Email does not exist");
}
},
https://themeteorchef.com/snippets/sign-up-with-email-verification/#tmc-customizing-the-verification-template – Kalman