_ = require('underscore') PersonalEmailLayout = require("./Layouts/PersonalEmailLayout") NotificationEmailLayout = require("./Layouts/NotificationEmailLayout") settings = require("settings-sharelatex") templates = {} templates.welcome = subject: _.template "Welcome to ShareLaTeX" layout: PersonalEmailLayout type:"lifecycle" compiledTemplate: _.template '''
Hi <%= first_name %>,
Thanks for signing up to ShareLaTeX! If you ever get lost, you can log in again here with the email address "<%= to %>".
If you're new to LaTeX, take a look at our Help Guides and Templates.
Regards,
Henry
ShareLaTeX Co-founder
PS. We love talking to our users about ShareLaTeX. Reply to this email to get in touch us with us directly, whatever the reason. Questions, comments, problems, suggestions, all welcome!
''' templates.canceledSubscription = subject: _.template "ShareLaTeX thoughts" layout: PersonalEmailLayout type:"lifecycle" compiledTemplate: _.template '''
Hi <%= first_name %>,
I'm sorry to see you cancelled your ShareLaTeX premium account. Would you mind giving me some advice on what the site is lacking at the moment? Feedback from our users is the only way we can improve ShareLaTeX.
Thank you in advance.
Henry
ShareLaTeX Co-founder
We got a request to reset your ShareLaTeX password.
If you didn't request a password reset, let us know.
Thank you
''' templates.projectSharedWithYou = subject: _.template "<%= owner.email %> wants to share <%= project.name %> with you" layout: NotificationEmailLayout type:"notification" compiledTemplate: _.template '''Hi, <%= owner.email %> wants to share '<%= project.name %>' with you
Thank you
''' module.exports = buildEmail: (templateName, opts)-> template = templates[templateName] opts.siteUrl = settings.siteUrl opts.body = template.compiledTemplate(opts) return { subject : template.subject(opts) html: template.layout(opts) type:template.type }