SubscriptionEmailBuilder.js 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. const EmailBuilder = require('../Email/EmailBuilder')
  2. const EmailMessageHelper = require('../Email/EmailMessageHelper')
  3. const settings = require('@overleaf/settings')
  4. EmailBuilder.templates.trialOnboarding = EmailBuilder.NoCTAEmailTemplate({
  5. subject(opts) {
  6. return `Welcome to your Overleaf ${opts.planName} plan trial`
  7. },
  8. title(opts) {
  9. return `Welcome to your Overleaf ${opts.planName} plan trial`
  10. },
  11. greeting() {
  12. return 'Hello,'
  13. },
  14. message(opts, isPlainText) {
  15. const invitingNamedCollaborators = EmailMessageHelper.displayLink(
  16. 'Read More',
  17. `${settings.siteUrl}/learn/how-to/Sharing_a_project?utm_source=Overleaf&utm_medium=email&utm_campaign=TrialEmail&utm_content=invitelink#Inviting_named_collaborators`,
  18. isPlainText
  19. )
  20. const increasedCompileTimeout = EmailMessageHelper.displayLink(
  21. 'Read More',
  22. `${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`,
  23. isPlainText
  24. )
  25. const realTimeTrackChanges = EmailMessageHelper.displayLink(
  26. 'Read More',
  27. `${settings.siteUrl}/learn/how-to/Track_Changes_in_Overleaf?utm_source=Overleaf&utm_medium=email&utm_campaign=TrialEmail&utm_content=trackchangeslink`,
  28. isPlainText
  29. )
  30. const history = EmailMessageHelper.displayLink(
  31. 'Read More',
  32. `${settings.siteUrl}/learn/latex/Using_the_History_feature?utm_source=Overleaf&utm_medium=email&utm_campaign=TrialEmail&utm_content=historylink`,
  33. isPlainText
  34. )
  35. const versioning = EmailMessageHelper.displayLink(
  36. 'Read More',
  37. `${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`,
  38. isPlainText
  39. )
  40. const advancedReferenceSearch = EmailMessageHelper.displayLink(
  41. 'Read More',
  42. `${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`,
  43. isPlainText
  44. )
  45. const referenceManagerSync = EmailMessageHelper.displayLink(
  46. 'Read More',
  47. `${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`,
  48. isPlainText
  49. )
  50. const dropboxSync = EmailMessageHelper.displayLink(
  51. 'Read More',
  52. `${settings.siteUrl}/learn/how-to/Dropbox_Synchronization?utm_source=Overleaf&utm_medium=email&utm_campaign=TrialEmail&utm_content=dropboxlink`,
  53. isPlainText
  54. )
  55. const gitSync = EmailMessageHelper.displayLink(
  56. 'Read More',
  57. `${settings.siteUrl}/learn/how-to/Using_Git_and_GitHub?utm_source=Overleaf&utm_medium=email&utm_campaign=TrialEmail&utm_content=gitgithublink`,
  58. isPlainText
  59. )
  60. const symbolPalette = EmailMessageHelper.displayLink(
  61. 'Read More',
  62. `${settings.siteUrl}/learn/how-to/Using_the_Symbol_Palette_in_Overleaf#:~:text=To%20open%20the%20Symbol%20Palette,the%20handle%20up%20and%20down.`,
  63. isPlainText
  64. )
  65. const latexTutorials = EmailMessageHelper.displayLink(
  66. 'Read More',
  67. `${settings.siteUrl}/learn/latex/Learn_LaTeX_in_30_minutes?utm_source=Overleaf&utm_medium=email&utm_campaign=TrialEmail&utm_content=latextutorialslink`,
  68. isPlainText
  69. )
  70. const knowledgeBase = EmailMessageHelper.displayLink(
  71. 'Read More',
  72. `${settings.siteUrl}/learn?utm_source=Overleaf&utm_medium=email&utm_campaign=TrialEmail&utm_content=learnlink`,
  73. isPlainText
  74. )
  75. const technicalArticles = EmailMessageHelper.displayLink(
  76. 'Read More',
  77. `${settings.siteUrl}/learn/latex/Articles?utm_source=Overleaf&utm_medium=email&utm_campaign=TrialEmail&utm_content=articleslink`,
  78. isPlainText
  79. )
  80. const webinars = EmailMessageHelper.displayLink(
  81. 'Read More',
  82. `${settings.siteUrl}/events/webinars?utm_source=Overleaf&utm_medium=email&utm_campaign=TrialEmail&utm_content=webinarslink`,
  83. isPlainText
  84. )
  85. const cancel = EmailMessageHelper.displayLink(
  86. 'cancel at any time',
  87. `${settings.siteUrl}/learn/how-to/Canceling_Subscription?utm_source=Overleaf&utm_medium=email&utm_campaign=TrialEmail&utm_content=cancellink`,
  88. isPlainText
  89. )
  90. const feedback = EmailMessageHelper.displayLink(
  91. 'hear your feedback',
  92. `https://docs.google.com/forms/d/e/1FAIpQLSfMbbh_z-9-dZ3YnrDCyNpNxFPGA492ZSallKOt8WWp2nx7kg/viewform?usp=sf_link/viewform`,
  93. isPlainText
  94. )
  95. const unsubscribe = EmailMessageHelper.displayLink(
  96. 'here',
  97. `${settings.siteUrl}/user/email-preferences`,
  98. isPlainText
  99. )
  100. const canInviteMoreNamedCollaborators =
  101. opts.features.collaborators === -1 ||
  102. opts.features.collaborators > settings.defaultFeatures.collaborators
  103. let n = 1
  104. return [
  105. `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.`,
  106. `<b>During your trial period, be sure to check out these premium features: </b>`,
  107. ...(canInviteMoreNamedCollaborators
  108. ? [
  109. `${n++}. <b>Invite more collaborators</b>: 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.`,
  110. `<ul><li> Inviting Named Collaborators: ${invitingNamedCollaborators}</li></ul>`,
  111. ]
  112. : []),
  113. `${n++}. <b>Increased compile timeout</b>: You now have more time for compilation (to generate a PDF of your document) before receiving a timeout error message.`,
  114. `<ul><li> Compile Timeout: ${increasedCompileTimeout}</li></ul>`,
  115. ...(opts.features.trackChanges
  116. ? [
  117. `${n++}. <b>Real-time track changes</b>: The track changes mode lets you see exactly what has been changed by your collaborators, and allows you to accept or reject each individual change. `,
  118. `<ul><li> Track Changes: ${realTimeTrackChanges}</li></ul>`,
  119. ]
  120. : []),
  121. `${n++}. <b>Full document history and versioning</b>: View the entire history of your project with the ability to revert to previous versions of your document from your project history (versus only 24 hours of history availability on a free Overleaf account). No more fear of losing work or making changes you can’t undo. `,
  122. `<ul><li> History: ${history}</li>
  123. <li>Versioning: ${versioning}</li></ul>`,
  124. `${n++}. <b>Advanced reference search</b>: You can search by citation key, and our premium feature allows the added ability to search by author, title, year, or journal.`,
  125. `<ul><li>Advanced Reference Search: ${advancedReferenceSearch}</li></ul>`,
  126. `${n++}. <b>Reference manager sync </b>: You can link your Mendeley and Zotero accounts to your Overleaf account, allowing you to import your reference library and keep your Overleaf document in sync with the references stored in Mendeley / Zotero.`,
  127. `<ul><li> Reference Manager Sync: ${referenceManagerSync}</li></ul>`,
  128. `${n++}. <b>Dropbox Sync</b>: You can link your Dropbox account to your Overleaf account, allowing 2-way integration with Dropbox `,
  129. `<ul><li> Dropbox Sync: ${dropboxSync}</li></ul>`,
  130. `${n++}. <b>Git and GitHub integration</b>: You can configure your Overleaf project to sync directly with a repository on GitHub, or you can use raw git access. This allows you to work offline and sync your files whenever you come back online. You can also use our Overleaf Git Bridge integration, which lets you git clone, push and pull changes between the online Overleaf editor, and your local offline git repository.`,
  131. `<ul><li> Git, GitHub and Git Bridge: ${gitSync}</li></ul>`,
  132. `${n++}. <b>Symbol Palette</b>: A quick and convenient tool to insert math symbols into your document.`,
  133. `<ul><li> Symbol Palette: ${symbolPalette}</li></ul>`,
  134. `${n++}. <b>Online tutorials and knowledge base</b>: We have an extensive online knowledge base providing a wide range of platform guidance, LaTeX tutorials, technical articles, and webinars.`,
  135. `<ul><li>LaTeX tutorials: ${latexTutorials}</li>
  136. <li>Knowledge base: ${knowledgeBase}</li>
  137. <li>Technical articles: ${technicalArticles}</li>
  138. <li>Webinars: ${webinars}</li></ul>`,
  139. `Your trial will last for seven days from when you started it, and you can ${cancel} via your subscription page on your dashboard. If you’d like to continue your subscription after your trial, you’re all set!`,
  140. `Please let us know if we can provide any additional support or answer any questions - and we’d love to ${feedback}!`,
  141. `Thanks again for supporting Overleaf - Happy TeXing!`,
  142. `The Overleaf Team <hr>`,
  143. `You're receiving this email because you've recently signed up for an Overleaf premium trial. If you've previously subscribed to emails about product offers and company news and events, you can unsubscribe ${unsubscribe}.`,
  144. ]
  145. },
  146. })