const EmailBuilder = require('../Email/EmailBuilder') const EmailMessageHelper = require('../Email/EmailMessageHelper') const settings = require('@overleaf/settings') EmailBuilder.templates.trialOnboarding = EmailBuilder.NoCTAEmailTemplate({ subject() { return `Welcome to your ${settings.appName} Premium Features Trial` }, title() { return `Welcome to your Overleaf Premium Features Trial` }, greeting() { return 'Hello,' }, message(opts, isPlainText) { const invitingNamedCollaborators = EmailMessageHelper.displayLink( 'Read More', `${settings.siteUrl}/learn/how-to/Sharing_a_project?utm_source=Overleaf&utm_medium=email&utm_campaign=TrialEmail&utm_content=invitelink#Inviting_named_collaborators`, isPlainText ) const increasedCompileTimeout = EmailMessageHelper.displayLink( 'Read More', `${settings.siteUrl}/learn/how-to/What_is_the_maximum_compilation_time,_file_number_and_project_size_allowed_on_free_vs_paid_plans%3F?utm_source=Overleaf&utm_medium=email&utm_campaign=TrialEmail&utm_content=compilelink`, isPlainText ) const realTimeTrackChanges = EmailMessageHelper.displayLink( 'Read More', `${settings.siteUrl}/learn/how-to/Track_Changes_in_Overleaf?utm_source=Overleaf&utm_medium=email&utm_campaign=TrialEmail&utm_content=trackchangeslink`, isPlainText ) const history = EmailMessageHelper.displayLink( 'Read More', `${settings.siteUrl}/learn/latex/Using_the_History_feature?utm_source=Overleaf&utm_medium=email&utm_campaign=TrialEmail&utm_content=historylink`, isPlainText ) const versioning = EmailMessageHelper.displayLink( 'Read More', `${settings.siteUrl}/learn/how-to/Can_I_save_versions_of_my_work%3F?utm_source=Overleaf&utm_medium=email&utm_campaign=TrialEmail&utm_content=versioninglink`, isPlainText ) const advancedReferenceSearch = EmailMessageHelper.displayLink( 'Read More', `${settings.siteUrl}/learn/how-to/How_to_search_for_references_in_an_Overleaf_project?utm_source=Overleaf&utm_medium=email&utm_campaign=TrialEmail&utm_content=adrefsearchlink`, isPlainText ) const referenceManagerSync = EmailMessageHelper.displayLink( 'Read More', `${settings.siteUrl}/learn/how-to/How_to_link_your_Overleaf_account_to_Mendeley_and_Zotero?utm_source=Overleaf&utm_medium=email&utm_campaign=TrialEmail&utm_content=refmansynclink`, isPlainText ) const dropboxSync = EmailMessageHelper.displayLink( 'Read More', `${settings.siteUrl}/learn/how-to/Dropbox_Synchronization?utm_source=Overleaf&utm_medium=email&utm_campaign=TrialEmail&utm_content=dropboxlink`, isPlainText ) const gitSync = EmailMessageHelper.displayLink( 'Read More', `${settings.siteUrl}/learn/how-to/Using_Git_and_GitHub?utm_source=Overleaf&utm_medium=email&utm_campaign=TrialEmail&utm_content=gitgithublink`, isPlainText ) const latexTutorials = EmailMessageHelper.displayLink( 'Read More', `${settings.siteUrl}/learn/latex/Learn_LaTeX_in_30_minutes?utm_source=Overleaf&utm_medium=email&utm_campaign=TrialEmail&utm_content=latextutorialslink`, isPlainText ) const knowledgeBase = EmailMessageHelper.displayLink( 'Read More', `${settings.siteUrl}/learn?utm_source=Overleaf&utm_medium=email&utm_campaign=TrialEmail&utm_content=learnlink`, isPlainText ) const technicalArticles = EmailMessageHelper.displayLink( 'Read More', `${settings.siteUrl}/learn/latex/Articles?utm_source=Overleaf&utm_medium=email&utm_campaign=TrialEmail&utm_content=articleslink`, isPlainText ) const webinars = EmailMessageHelper.displayLink( 'Read More', `${settings.siteUrl}/events/webinars?utm_source=Overleaf&utm_medium=email&utm_campaign=TrialEmail&utm_content=webinarslink`, isPlainText ) const cancel = EmailMessageHelper.displayLink( 'cancel at any time', `${settings.siteUrl}/learn/how-to/Canceling_Subscription?utm_source=Overleaf&utm_medium=email&utm_campaign=TrialEmail&utm_content=cancellink`, isPlainText ) const feedback = EmailMessageHelper.displayLink( 'hear your feedback', `https://docs.google.com/forms/d/e/1FAIpQLSfMbbh_z-9-dZ3YnrDCyNpNxFPGA492ZSallKOt8WWp2nx7kg/viewform?usp=sf_link/viewform`, isPlainText ) const unsubscribe = EmailMessageHelper.displayLink( 'here', `${settings.siteUrl}/user/settings`, isPlainText ) return [ `Welcome to your Overleaf Premium Features Trial! We really appreciate your support of Overleaf and are excited for you to use our premium features and get the most out of your trial.`, `During your trial period, be sure to check out these premium features: `, `1. Invite more collaborators: You can now invite named collaborators to your project via the ‘share’ menu in your project (with read-only or edit access). Simply add their email address and an email invitation will be sent to them. You can remove these named collaborators at any time via the same ‘share’ menu.`, `