0
我想创建一个自定义url并将其传递到HTML电子邮件。该电子邮件的作品,但现在我必须手动更改网址,当我推动应用程序生活包含实时网址。有没有办法做到这一点?添加url链接到电子邮件
我想要做的事:
Dev enviroment
localhost:3000/profile
Live enviroment
www.address.com/profile
-
sendEmail: function (subject, userId) {
check([subject, userId], [String]);
// Let other method calls from the same client start running,
// without waiting for the email sending to complete.
this.unblock();
SSR.compileTemplate('htmlEmail', Assets.getText('sendEmail.html'));
// to find the users info for the logged in users
// var user = Meteor.user();
var emailData = {
url: Meteor.absoluteUrl() + "/profile"
};
Email.send({
to: to,
from: from,
subject: subject,
html: SSR.render('htmlEmail', emailData)
});
}