2014-01-17 12:53:17 -05:00
|
|
|
config = require '../server_config'
|
|
|
|
sendwithusAPI = require 'sendwithus'
|
|
|
|
swuAPIKey = config.mail.sendwithusAPIKey
|
2016-04-11 19:51:51 -04:00
|
|
|
log = require 'winston'
|
2014-01-27 14:14:44 -05:00
|
|
|
|
|
|
|
module.exports.setupRoutes = (app) ->
|
|
|
|
return
|
|
|
|
|
2014-03-11 22:17:58 -04:00
|
|
|
debug = not config.isProduction
|
2016-04-11 19:51:51 -04:00
|
|
|
module.exports.api =
|
|
|
|
send: (context, cb) ->
|
2016-05-06 16:28:19 -04:00
|
|
|
log.debug('Tried to send email with context: ', JSON.stringify(context, null, ' '))
|
2016-04-11 19:51:51 -04:00
|
|
|
setTimeout(cb, 10)
|
|
|
|
|
|
|
|
if swuAPIKey
|
|
|
|
module.exports.api = new sendwithusAPI swuAPIKey, debug
|
|
|
|
|
2014-01-17 12:53:17 -05:00
|
|
|
module.exports.templates =
|
2015-02-04 16:54:35 -05:00
|
|
|
parent_subscribe_email: 'tem_2APERafogvwKhmcnouigud'
|
2015-02-06 17:49:47 -05:00
|
|
|
share_progress_email: 'tem_VHE3ihhGmVa3727qds9zY8'
|
2016-05-11 17:39:26 -04:00
|
|
|
welcome_email_user: 'tem_z7Xvj3mtWYk6ec6aW7RwFk'
|
|
|
|
welcome_email_student: 'tem_4WYPZNLzs5wawMF9qUJXUH'
|
|
|
|
verify_email: 'tem_zJee6uRsRmzqzktzneCkCn'
|
2014-03-10 16:20:00 -04:00
|
|
|
ladder_update_email: 'JzaZxf39A4cKMxpPZUfWy4'
|
2014-04-17 20:09:01 -04:00
|
|
|
patch_created: 'tem_xhxuNosLALsizTNojBjNcL'
|
2014-04-17 20:30:55 -04:00
|
|
|
change_made_notify_watcher: 'tem_7KVkfmv9SZETb25dtHbUtG'
|
2014-06-27 03:36:03 -04:00
|
|
|
recruiting_email: 'tem_mdFMgtcczHKYu94Jmq68j8'
|
2014-06-12 18:25:42 -04:00
|
|
|
greed_tournament_rank: 'tem_c4KYnk2TriEkkZx5NqqGLG'
|
2014-12-11 23:06:03 -05:00
|
|
|
generic_email: 'tem_JhRnQ4pvTS4KdQjYoZdbei'
|
|
|
|
plain_text_email: 'tem_85UvKDCCNPXsFckERTig6Y'
|
2015-03-04 20:08:45 -05:00
|
|
|
next_steps_email: 'tem_RDHhTG5inXQi8pthyqWr5D'
|
2016-05-31 19:09:52 -04:00
|
|
|
course_invite_email: 'tem_ic2ZhPkpj8GBADFuyAp4bj'
|
2016-01-07 18:45:46 -05:00
|
|
|
teacher_free_trial: 'tem_R7d9Hpoba9SceQNiYSXBak'
|
2015-11-24 13:32:15 -05:00
|
|
|
teacher_free_trial_hoc: 'tem_4ZSY9wsA9Qwn4wBFmZgPdc'
|
2016-03-04 15:05:07 -05:00
|
|
|
teacher_request_demo: 'tem_cwG3HZjEyb6QE493hZuUra'
|
2016-04-12 16:28:38 -04:00
|
|
|
password_reset: 'tem_wbQUMRtLY9xhec8BSCykLA'
|