mirror of
https://github.com/overleaf/overleaf.git
synced 2024-10-24 21:12:38 -04:00
20 lines
515 B
JavaScript
20 lines
515 B
JavaScript
|
const EmailHandler = require('../Email/EmailHandler')
|
||
|
const UserGetter = require('../User/UserGetter')
|
||
|
require('./SubscriptionEmailBuilder')
|
||
|
|
||
|
const SubscriptionEmailHandler = {
|
||
|
async sendTrialOnboardingEmail(userId) {
|
||
|
const user = await UserGetter.promises.getUser(userId, {
|
||
|
email: 1,
|
||
|
})
|
||
|
|
||
|
const emailOptions = {
|
||
|
to: user.email,
|
||
|
sendingUser_id: userId,
|
||
|
}
|
||
|
await EmailHandler.promises.sendEmail('trialOnboarding', emailOptions)
|
||
|
},
|
||
|
}
|
||
|
|
||
|
module.exports = SubscriptionEmailHandler
|