How to send email notification using Email.send?


I was wondering how do I send an email notification using email.send?

I’ve been able to implement sending verification email and reset password email. However this was a simple configuration on /server and on /both.

How do I invoke an email to be sent?

Thanks for the recommendation. I tried searching and reading there. The problem is not defining the templates or setting up the emails.

I’ve an issue “calling” the email method like say when someone replies to a post in my web application.

Can you do it in the method? On the reply’s click event, call a method and send it the relevant info and call the with the given template.

    sendEmailOnReplyMethod: function( replyRecipientId){

    SSR.compileTemplate( 'htmlEmail', Assets.getText( 'you-got-a-reply-email.html' ) );

        var thisUserDoc = Meteor.users.findOne({_id: replyRecipientId});
        var thisUserEmail = thisUserDoc.emails[0].address;

            to: thisUserEmail,
            from: '',
            subject: "You got a reply!",
            html: SSR.render( 'htmlEmail' )
1 Like