I have created the helpers and event for forgot the password and also I have written code for contact email and the code is working successfully and am able to send emails but I want to use an email template. I did a verification email used an email template using a package called "meteor add meteorhacks:ssr" from atmosphere as suggested before.
Here is the code which I have written and plz help me out
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");
}
});
I have Written methods for sending email, as below under server side methods.js
Meteor.methods({
'sendEmail' :function(from,phone,fname,subj,body){
this.unblock();
Email.send({
to:'sample@sample.com',
from:from,
subject:subj,
text:phone,
text:fname,
text:body,
html: SSR.render('contactbody', sendEmail)
})
},
Please suggest to me how to include a email template for both forgot password and contact email. I have tried with ssr package created a email body under private folder and tried to insert on server side but it is not working but and so looking for a help !!! please suggest me how to approach.