我已經創建了幫助程序和事件以便忘記密碼,並且我已經編寫了聯繫人電子郵件的代碼,並且代碼運行成功並且能夠發送電子郵件,但是我想使用電子郵件模板。我做了一個驗證電子郵件,使用一個電子郵件模板,使用名爲的程序包「meteor add meteorhacks:ssr」。重置密碼電子郵件模板
這裏是我寫和PLZ幫我
Template.recoverPassword.events({
'submit #recovery-form':function(e,t){
e.preventDefault();
var email= t.find('#recovery-email').value;
Accounts.forgotPassword({email: email},function(error){
if(error){
alert("unable to send reset link");
}
else{
alert("password reset link sent");
}
});
我已經寫方法在服務器端發送電子郵件,如下methods.js
Meteor.methods({
'sendEmail' :function(from,phone,fname,subj,body){
this.unblock();
Email.send({
to:'[email protected]',
from:from,
subject:subj,
text:phone,
text:fname,
text:body,
html: SSR.render('contactbody', sendEmail)
})
},
代碼請向我建議如何爲忘記密碼和聯繫電子郵件添加電子郵件模板。我已經嘗試過使用ssr包在私人文件夾下創建一個電子郵件正文,並試圖插入服務器端,但它不工作,但等待尋求幫助!請告訴我如何處理。
Hi @shivani,什麼是聯繫郵件? –
用戶可以發送電子郵件,如果他有任何關於網站的查詢..因爲我已經創建了一個聯繫表格,就好像現在正常的電子郵件沒有任何設計工作我想插入電子郵件模板。 – Shivani