Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/zoom welcome mail #184

Merged
merged 1 commit into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions web/ASC.Web.Core/Notify/Actions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,4 +154,6 @@ public static class Actions
public static readonly INotifyAction SaasOwnerPaymentWarningGracePeriodExpired = new NotifyAction("saas_owner_payment_warning_grace_period_expired");

public static readonly INotifyAction SaasAdminVideoGuides = new NotifyAction("saas_video_guides_v1");

public static readonly INotifyAction ZoomWelcome = new NotifyAction("zoom_welcome");
}
27 changes: 27 additions & 0 deletions web/ASC.Web.Core/Notify/StudioNotifyService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,33 @@ private string GetControlPanelUrl(string serverRootPath)

#endregion


#region Zoom

public async Task SendZoomWelcomeAsync(UserInfo u)
{
try
{
var culture = GetCulture(u);
var txtTrulyYours = WebstudioNotifyPatternResource.ResourceManager.GetString("TrulyYoursText", culture);

await _client.SendNoticeToAsync(
Actions.ZoomWelcome,
await _studioNotifyHelper.RecipientFromEmailAsync(u.Email, false),
new[] { EMailSenderName },
new TagValue(CommonTags.Culture, culture.Name),
new TagValue(Tags.UserName, u.FirstName.HtmlEncode()),
new TagValue(CommonTags.TopGif, _studioNotifyHelper.GetNotificationImageUrl("welcome.gif")),
TagValues.TrulyYours(_studioNotifyHelper, txtTrulyYours));
}
catch (Exception error)
{
_log.ErrorSendCongratulations(error);
}
}

#endregion

private CultureInfo GetCulture(UserInfo user)
{
CultureInfo culture = null;
Expand Down
4 changes: 3 additions & 1 deletion web/ASC.Web.Core/Notify/StudioNotifySource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ protected override IActionProvider CreateActionProvider()
Actions.SaasOwnerPaymentWarningGracePeriodBeforeActivation,
Actions.SaasOwnerPaymentWarningGracePeriodActivation,
Actions.SaasOwnerPaymentWarningGracePeriodLastDay,
Actions.SaasOwnerPaymentWarningGracePeriodExpired
Actions.SaasOwnerPaymentWarningGracePeriodExpired,

Actions.ZoomWelcome
);
}

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -2426,4 +2426,23 @@ $TrulyYours</comment>
<data name="subject_saas_video_guides_v1" xml:space="preserve">
<value>Master ONLYOFFICE DocSpace with video guides</value>
</data>
<data name="pattern_zoom_welcome" xml:space="preserve">
<value>h1. to &lt;span style="color:#FF6F3D;"&gt;ONLYOFFICE&lt;/span&gt; DocSpace!


Hello, $UserName!

You have just created ONLYOFFICE DocSpace, a document hub where you can boost collaboration with your team, customers, partners, and more. Its address is "${__VirtualRootPath}":"${__VirtualRootPath}".

Your current tariff plan is STARTUP. It is absolutely free and includes:

&lt;table cellspacing="0" cellpadding="0" background="#ffffff" style="background-color: #ffffff; border: 0 none; border-collapse: collapse; border-spacing: 0; -moz-border-radius: 6px; -webkit-border-radius: 6px; border-radius: 6px; color: #333333; empty-cells: show; height: 0px; margin: auto; max-width: 342px; padding: 0; vertical-align: top; width: 100%; text-align: left;"&gt;&lt;tbody&gt;&lt;tr border="0" cellspacing="0" cellpadding="0"&gt;&lt;td style="color: #FF6F3D; font-family: 'Open Sans', Helvetica, Arial, Tahoma; font-size: 18px; line-height: 29px; margin: 0; padding-bottom: 16px; padding-right: 16px; width: 5%;vertical-align: top;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;bull;&lt;/td&gt;&lt;td style="font-family: 'Open Sans', Helvetica, Arial, Tahoma, sans-serif; font-size: 18px; line-height: 29px; margin: 0; padding-bottom: 16px; vertical-align: top;"&gt;100 admins/power users&lt;/td&gt;&lt;/tr&gt;&lt;tr border="0" cellspacing="0" cellpadding="0"&gt;&lt;td style="color: #FF6F3D; font-family: 'Open Sans', Helvetica, Arial, Tahoma; font-size: 18px; line-height: 29px; margin: 0; padding-bottom: 16px; padding-right: 16px; width: 5%;vertical-align: top;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;bull;&lt;/td&gt;&lt;td style="font-family: 'Open Sans', Helvetica, Arial, Tahoma, sans-serif; font-size: 18px; line-height: 29px; margin: 0; padding-bottom: 16px; vertical-align: top;"&gt;Up to 100 rooms&lt;/td&gt;&lt;/tr&gt;&lt;tr border="0" cellspacing="0" cellpadding="0"&gt;&lt;td style="color: #FF6F3D; font-family: 'Open Sans', Helvetica, Arial, Tahoma; font-size: 18px; line-height: 29px; margin: 0; padding-bottom: 32px; padding-right: 16px; width: 5%;vertical-align: top;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;bull;&lt;/td&gt;&lt;td style="font-family: 'Open Sans', Helvetica, Arial, Tahoma, sans-serif; font-size: 18px; line-height: 29px; margin: 0; padding-bottom: 32px; vertical-align: top;"&gt;100 GB disk space&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;

*Enjoy a new way of document collaboration!*

$TrulyYours</value>
</data>
<data name="subject_zoom_welcome" xml:space="preserve">
<value>Welcome to ONLYOFFICE DocSpace!</value>
</data>
</root>
6 changes: 6 additions & 0 deletions web/ASC.Web.Core/PublicResources/webstudio_patterns.xml
Original file line number Diff line number Diff line change
Expand Up @@ -704,4 +704,10 @@ $activity.Key
<body styler="ASC.Notify.Textile.TextileStyler,ASC.Notify.Textile" resource="|pattern_saas_docspace_invite|ASC.Web.Core.PublicResources.WebstudioNotifyPatternResource,ASC.Web.Core" />
</pattern>

<!-- zoom welcome -->
<pattern id="zoom_welcome">
<subject resource="|subject_zoom_welcome|ASC.Web.Core.PublicResources.WebstudioNotifyPatternResource,ASC.Web.Core"/>
<body styler="ASC.Notify.Textile.TextileStyler,ASC.Notify.Textile" resource="|pattern_zoom_welcome|ASC.Web.Core.PublicResources.WebstudioNotifyPatternResource,ASC.Web.Core" />
</pattern>

</patterns>
Loading