overleaf/services/web/app/coffee/Features/Email/EmailHandler.coffee
2014-03-04 18:10:06 +00:00

14 lines
401 B
CoffeeScript

EmailTemplator = require "./EmailTemplator"
EmailSender = require "./EmailSender"
module.exports =
sendEmail : (emailType, opts, callback)->
email = EmailTemplator.buildEmail emailType, opts
opts.html = email.html
opts.subject = email.subject
EmailSender.sendEmail opts, (err)->
callback(err)
# module.exports.sendEmail "welcome", {first_name:"henry", to:"henry.oswald@gmail.com"}, ->