mirror of
https://github.com/overleaf/overleaf.git
synced 2024-10-31 21:21:03 -04:00
14 lines
No EOL
424 B
CoffeeScript
14 lines
No EOL
424 B
CoffeeScript
settings = require("settings-sharelatex")
|
|
EmailBuilder = require "./EmailBuilder"
|
|
EmailSender = require "./EmailSender"
|
|
|
|
module.exports =
|
|
|
|
sendEmail : (emailType, opts, callback)->
|
|
email = EmailBuilder.buildEmail emailType, opts
|
|
if email.type == "lifecycle" and !settings.email.lifecycle
|
|
return callback()
|
|
opts.html = email.html
|
|
opts.subject = email.subject
|
|
EmailSender.sendEmail opts, (err)->
|
|
callback(err) |