mirror of
https://github.com/bitwarden/server.git
synced 2025-04-05 21:18:13 -05:00
remove markdown and razor mail templates/services
This commit is contained in:
parent
fb2ee6aaea
commit
a06502be9a
@ -8,8 +8,6 @@
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="licensing.cer" />
|
||||
<EmbeddedResource Include="MailTemplates\Markdown\**\*.md" />
|
||||
<EmbeddedResource Include="MailTemplates\Razor\**\*.cshtml" />
|
||||
<EmbeddedResource Include="MailTemplates\Handlebars\**\*.hbs" />
|
||||
</ItemGroup>
|
||||
|
||||
@ -35,11 +33,9 @@
|
||||
<PackageReference Include="WindowsAzure.Storage" Version="9.3.0" />
|
||||
<PackageReference Include="AspNetCoreRateLimit" Version="2.1.0" />
|
||||
<PackageReference Include="Braintree" Version="4.5.0" />
|
||||
<PackageReference Include="CommonMark.NET" Version="0.15.1" />
|
||||
<PackageReference Include="Portable.BouncyCastle" Version="1.8.2" />
|
||||
<PackageReference Include="RazorLight" Version="2.0.0-alpha3" />
|
||||
<PackageReference Include="Sendgrid" Version="9.9.0" />
|
||||
<PackageReference Include="Stripe.net" Version="17.7.0" />
|
||||
<PackageReference Include="Stripe.net" Version="17.8.0" />
|
||||
<PackageReference Include="U2F.Core" Version="1.0.4" />
|
||||
<PackageReference Include="Otp.NET" Version="1.2.0" />
|
||||
<PackageReference Include="YubicoDotNetClient" Version="1.2.0" />
|
||||
|
@ -1 +0,0 @@
|
||||
To finalize changing your email address enter the following code in the pop-up window: {{token}}
|
@ -1,3 +0,0 @@
|
||||
A user ({{fromEmail}}) recently tried to change their account to use this email address ({{toEmail}}). An account already exists with this email ({{toEmail}}).
|
||||
|
||||
If you did not try to change an email address, you can safely ignore this email.
|
@ -1,5 +0,0 @@
|
||||
This is a reminder that your Bitwarden subscription is due for renewal soon. Your payment method on file will be charged for **{{amountDue}}** on **{{dueDate}}**.
|
||||
|
||||
To avoid any interruption in service, please ensure that your payment method on file is up to date and can be charged for the above amount. You can manage your subscription and payment method by logging into the web vault at <{{vaultUrl}}>. Once logged in, navigate to the Billing page for your account.
|
||||
|
||||
If you have any questions or problems, please feel free to email us at hello@bitwarden.com.
|
@ -1,7 +0,0 @@
|
||||
You (or someone) recently requested your master password hint.
|
||||
|
||||
Your hint is: "{{hint}}"
|
||||
|
||||
Login: <{{vaultUrl}}>
|
||||
|
||||
If you did not request your master password hint you can safely ignore this email.
|
@ -1,3 +0,0 @@
|
||||
You (or someone) recently requested your master password hint. Unfortunately, your account does not have a master password hint.
|
||||
|
||||
If you did not request your master password hint you can safely ignore this email.
|
@ -1,5 +0,0 @@
|
||||
This email is to notify you that {{userEmail}} has accepted your invitation to join {{organizationName}}.
|
||||
|
||||
To confirm this user, log into the Bitwarden web vault, manage your organization "People" and confirm the user.
|
||||
|
||||
If you do not wish to confirm this user, you can also remove them from the organization on the same page.
|
@ -1,3 +0,0 @@
|
||||
This email is to notify you that you have been confirmed as a user of {{organizationName}}.
|
||||
|
||||
Any collections and logins being shared with you by this organization will now appear in your Bitwarden vault.
|
@ -1,6 +0,0 @@
|
||||
You have been invited to join the {{organizationName}} organization. To accept this invite, click the
|
||||
following link:
|
||||
|
||||
<{{url}}>
|
||||
|
||||
If you do not wish to join this organization, you can safely ignore this email.
|
@ -1,5 +0,0 @@
|
||||
Click the following link to log in:
|
||||
|
||||
<{{url}}>
|
||||
|
||||
If you did not request to log in, you can safely ignore this email.
|
@ -1,3 +0,0 @@
|
||||
Your two-step verification code is: {{token}}
|
||||
|
||||
Use this code to complete logging in with Bitwarden.
|
@ -1,3 +0,0 @@
|
||||
Click the link below to delete your Bitwarden account ({{email}}). If you did not request this email to delete your Bitwarden account, you can safely ignore it.
|
||||
|
||||
<{{url}}>
|
@ -1,3 +0,0 @@
|
||||
Verify this email address for your Bitwarden account by clicking the following link. If you did not request this email to verify a Bitwarden account, you can safely ignore it.
|
||||
|
||||
<{{url}}>
|
@ -1,39 +0,0 @@
|
||||
Thank you for creating an account with Bitwarden. You may now log in with your new account.
|
||||
|
||||
Did you know that Bitwarden is free to sync with all of your devices? Download Bitwarden today on:
|
||||
|
||||
Desktop
|
||||
============
|
||||
|
||||
Access Bitwarden on Windows, macOS, and Linux desktops with our native desktop application.
|
||||
|
||||
<https://bitwarden.com/#download>
|
||||
|
||||
Web Browser
|
||||
============
|
||||
|
||||
Integrate Bitwarden directly into your favorite browser. Use our browser extensions for a seamless browsing experience.
|
||||
|
||||
<https://bitwarden.com/#download-browser>
|
||||
|
||||
Mobile
|
||||
============
|
||||
|
||||
Take Bitwarden on the go with our mobile apps for your phone or tablet device.
|
||||
|
||||
<https://bitwarden.com/#download-mobile>
|
||||
|
||||
Web
|
||||
============
|
||||
|
||||
Stuck without any of your devices? Using a friend's computer? You can access your Bitwarden vault from any web enabled device by using the web vault.
|
||||
|
||||
<{{vaultUrl}}?utm_source=welcome_email&utm_medium=email>
|
||||
|
||||
------------
|
||||
|
||||
If you have any questions or problems you can email us from our website at:
|
||||
<https://bitwarden.com/contact/?utm_source=welcome_email&utm_medium=email>
|
||||
|
||||
Thank you!
|
||||
The Bitwarden Team
|
@ -1,7 +0,0 @@
|
||||
@model Bit.Core.Models.Mail.EmailTokenViewModel
|
||||
@{
|
||||
Layout = "_BasicMailLayout";
|
||||
}
|
||||
<p>
|
||||
To finalize changing your email address enter the following code in the pop-up window: @Model.Token
|
||||
</p>
|
@ -1,5 +0,0 @@
|
||||
@model Bit.Core.Models.Mail.EmailTokenViewModel
|
||||
@{
|
||||
Layout = "_BasicMailLayout.text";
|
||||
}
|
||||
To finalize changing your email address enter the following code in the pop-up window: @Raw(Model.Token)
|
@ -1,11 +0,0 @@
|
||||
@model Bit.Core.Models.Mail.ChangeEmailExistsViewModel
|
||||
@{
|
||||
Layout = "_BasicMailLayout";
|
||||
}
|
||||
<p>
|
||||
A user (@Model.FromEmail) recently tried to change their account to use this
|
||||
email address (@Model.ToEmail). An account already exists with this email (@Model.ToEmail).
|
||||
</p>
|
||||
<p>
|
||||
If you did not try to change an email address, you can safely ignore this email.
|
||||
</p>
|
@ -1,7 +0,0 @@
|
||||
@model Bit.Core.Models.Mail.ChangeEmailExistsViewModel
|
||||
@{
|
||||
Layout = "_BasicMailLayout.text";
|
||||
}
|
||||
A user (@Raw(Model.FromEmail)) recently tried to change their account to use this email address (@Raw(Model.ToEmail)). An account already exists with this email (@Raw(Model.ToEmail)).
|
||||
|
||||
If you did not try to change an email address, you can safely ignore this email.
|
@ -1,35 +0,0 @@
|
||||
@model Bit.Core.Models.Mail.InvoiceUpcomingViewModel
|
||||
@{
|
||||
Layout = "_BasicMailLayout";
|
||||
}
|
||||
<p>
|
||||
This is a reminder that your Bitwarden subscription is due for renewal soon.
|
||||
Your payment method on file will be charged for <b>@Model.AmountDue.ToString("C")</b> on
|
||||
<b>@Model.DueDate.ToString("MMM dd, yyyy")</b>.
|
||||
</p>
|
||||
<p>
|
||||
<b><u>Summary Of Charges</u></b><br />
|
||||
@foreach(var item in Model.Items)
|
||||
{
|
||||
@:- @item<br />
|
||||
}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
To avoid any interruption in service, please ensure that your payment method
|
||||
on file is up to date and can be charged for the above amount. You can manage your
|
||||
subscription and payment method by logging into the web vault at
|
||||
<a href="@Model.WebVaultUrl" target="_blank">@Model.WebVaultUrl</a>. Once logged in,
|
||||
navigate to the Billing page for your account.
|
||||
</p>
|
||||
|
||||
@if(Model.MentionInvoices)
|
||||
{
|
||||
<p>
|
||||
Invoices for your payments can also be downloaded from Billing page for your account.
|
||||
</p>
|
||||
}
|
||||
<p>
|
||||
If you have any questions or problems, please feel free to email us at
|
||||
hello@bitwarden.com.
|
||||
</p>
|
@ -1,27 +0,0 @@
|
||||
@model Bit.Core.Models.Mail.InvoiceUpcomingViewModel
|
||||
@{
|
||||
Layout = "_BasicMailLayout.text";
|
||||
}
|
||||
This is a reminder that your Bitwarden subscription is due for renewal soon.
|
||||
Your payment method on file will be charged for @Model.AmountDue.ToString("C") on @Model.DueDate.ToString("MMM dd, yyyy").
|
||||
|
||||
Summary Of Charges
|
||||
------------------
|
||||
@foreach(var item in Model.Items)
|
||||
{
|
||||
@:- @item
|
||||
}
|
||||
|
||||
To avoid any interruption in service, please ensure that your payment method
|
||||
on file is up to date and can be charged for the above amount. You can manage your
|
||||
subscription and payment method by logging into the web vault at <@Model.WebVaultUrl>.
|
||||
Once logged in, navigate to the Billing page for your account.
|
||||
@if(Model.MentionInvoices)
|
||||
{
|
||||
@:
|
||||
@: Invoices for your payments can also be downloaded from Billing page for your
|
||||
@: account.
|
||||
}
|
||||
|
||||
If you have any questions or problems, please feel free to email us at
|
||||
hello@bitwarden.com.
|
@ -1,8 +0,0 @@
|
||||
@model Bit.Core.Models.Mail.MasterPasswordHintViewModel
|
||||
@{
|
||||
Layout = "_BasicMailLayout";
|
||||
}
|
||||
<p>You (or someone) recently requested your master password hint.</p>
|
||||
<p>Your hint is: "@Model.Hint"</p>
|
||||
<p>Login: <a href="@Raw(Model.WebVaultUrl)" target="_blank">@Model.WebVaultUrl</a></p>
|
||||
<p>If you did not request your master password hint you can safely ignore this email.</p>
|
@ -1,10 +0,0 @@
|
||||
@model Bit.Core.Models.Mail.MasterPasswordHintViewModel
|
||||
@{
|
||||
Layout = "_BasicMailLayout.text";
|
||||
}
|
||||
You (or someone) recently requested your master password hint.
|
||||
|
||||
Your hint is: "@Raw(Model.Hint)"
|
||||
Login: @Raw(@Model.WebVaultUrl)
|
||||
|
||||
If you did not request your master password hint you can safely ignore this email.
|
@ -1,9 +0,0 @@
|
||||
@model Bit.Core.Models.Mail.BaseMailModel
|
||||
@{
|
||||
Layout = "_BasicMailLayout";
|
||||
}
|
||||
<p>
|
||||
You (or someone) recently requested your master password hint.
|
||||
Unfortunately, your account does not have a master password hint.
|
||||
</p>
|
||||
<p>If you did not request your master password hint you can safely ignore this email.</p>
|
@ -1,7 +0,0 @@
|
||||
@model Bit.Core.Models.Mail.BaseMailModel
|
||||
@{
|
||||
Layout = "_BasicMailLayout.text";
|
||||
}
|
||||
You (or someone) recently requested your master password hint. Unfortunately, your account does not have a master password hint.
|
||||
|
||||
If you did not request your master password hint you can safely ignore this email.
|
@ -1,7 +0,0 @@
|
||||
@model Bit.Core.Models.Mail.OrganizationUserAcceptedViewModel
|
||||
@{
|
||||
Layout = "_BasicMailLayout";
|
||||
}
|
||||
<p>This email is to notify you that @Model.UserEmail has accepted your invitation to join @Model.OrganizationName.</p>
|
||||
<p>To confirm this user, log into the Bitwarden web vault, manage your organization "People, and confirm the user.</p>
|
||||
<p>If you do not wish to confirm this user, you can also remove them from the organization on the same page.</p>
|
@ -1,9 +0,0 @@
|
||||
@model Bit.Core.Models.Mail.OrganizationUserAcceptedViewModel
|
||||
@{
|
||||
Layout = "_BasicMailLayout.text";
|
||||
}
|
||||
This email is to notify you that @Raw(Model.UserEmail) has accepted your invitation to join @Raw(Model.OrganizationName).
|
||||
|
||||
To confirm this user, log into the Bitwarden web vault, manage your organization "People" and confirm the user.
|
||||
|
||||
If you do not wish to confirm this user, you can also remove them from the organization on the same page.
|
@ -1,6 +0,0 @@
|
||||
@model Bit.Core.Models.Mail.OrganizationUserConfirmedViewModel
|
||||
@{
|
||||
Layout = "_BasicMailLayout";
|
||||
}
|
||||
<p>This email is to notify you that you have been confirmed as a user of @(Model.OrganizationName).</p>
|
||||
<p>Any collections and logins being shared with you by this organization will now appear in your Bitwarden vault.</p>
|
@ -1,7 +0,0 @@
|
||||
@model Bit.Core.Models.Mail.OrganizationUserConfirmedViewModel
|
||||
@{
|
||||
Layout = "_BasicMailLayout.text";
|
||||
}
|
||||
This email is to notify you that you have been confirmed as a user of @Raw(Model.OrganizationName).
|
||||
|
||||
Any collections and logins being shared with you by this organization will now appear in your Bitwarden vault.
|
@ -1,13 +0,0 @@
|
||||
@model Bit.Core.Models.Mail.OrganizationUserInvitedViewModel
|
||||
@{
|
||||
Layout = "_BasicMailLayout";
|
||||
}
|
||||
<p>
|
||||
You have been invited to join the @Model.OrganizationName organization.
|
||||
To accept this invite, click the following link:
|
||||
</p>
|
||||
<p><a href="@Raw(Model.Url)" target="_blank" clicktracking=off>@Model.Url</a></p>
|
||||
<p>
|
||||
If you do not wish to join this organization, you can safely ignore
|
||||
this email.
|
||||
</p>
|
@ -1,9 +0,0 @@
|
||||
@model Bit.Core.Models.Mail.OrganizationUserInvitedViewModel
|
||||
@{
|
||||
Layout = "_BasicMailLayout.text";
|
||||
}
|
||||
You have been invited to join the @Raw(Model.OrganizationName) organization. To accept this invite, click the following link:
|
||||
|
||||
@Raw(Model.Url)
|
||||
|
||||
If you do not wish to join this organization, you can safely ignore this email.
|
@ -1,11 +0,0 @@
|
||||
@model Bit.Core.Models.Mail.PasswordlessSignInModel
|
||||
@{
|
||||
Layout = "_BasicMailLayout";
|
||||
}
|
||||
<p>
|
||||
Click the following link to log in:
|
||||
</p>
|
||||
<p><a href="@Raw(Model.Url)" target="_blank" clicktracking=off>@Model.Url</a></p>
|
||||
<p>
|
||||
If you did not request to log in, you can safely ignore this email.
|
||||
</p>
|
@ -1,9 +0,0 @@
|
||||
@model Bit.Core.Models.Mail.PasswordlessSignInModel
|
||||
@{
|
||||
Layout = "_BasicMailLayout.text";
|
||||
}
|
||||
Click the following link to log in:
|
||||
|
||||
@Raw(Model.Url)
|
||||
|
||||
If you did not request to log in, you can safely ignore this email.
|
@ -1,10 +0,0 @@
|
||||
@model Bit.Core.Models.Mail.EmailTokenViewModel
|
||||
@{
|
||||
Layout = "_BasicMailLayout";
|
||||
}
|
||||
<p>
|
||||
Your two-step verification code is: @Model.Token
|
||||
</p>
|
||||
<p>
|
||||
Use this code to complete logging in with Bitwarden.
|
||||
</p>
|
@ -1,7 +0,0 @@
|
||||
@model Bit.Core.Models.Mail.EmailTokenViewModel
|
||||
@{
|
||||
Layout = "_BasicMailLayout.text";
|
||||
}
|
||||
Your two-step verification code is: @Raw(Model.Token)
|
||||
|
||||
Use this code to complete logging in with Bitwarden.
|
@ -1,9 +0,0 @@
|
||||
@model Bit.Core.Models.Mail.VerifyDeleteModel
|
||||
@{
|
||||
Layout = "_BasicMailLayout";
|
||||
}
|
||||
<p>
|
||||
Click the link below to delete your Bitwarden account (@Model.Email).
|
||||
If you did not request this email to delete your Bitwarden account, you can safely ignore it.
|
||||
</p>
|
||||
<p><a href="@Raw(Model.Url)" target="_blank" clicktracking=off>@Model.Url</a></p>
|
@ -1,7 +0,0 @@
|
||||
@model Bit.Core.Models.Mail.VerifyDeleteModel
|
||||
@{
|
||||
Layout = "_BasicMailLayout.text";
|
||||
}
|
||||
Click the link below to delete your Bitwarden account (@Raw(Model.Email)). If you did not request this email to delete your Bitwarden account, you can safely ignore it.
|
||||
|
||||
@Raw(Model.Url)
|
@ -1,9 +0,0 @@
|
||||
@model Bit.Core.Models.Mail.VerifyEmailModel
|
||||
@{
|
||||
Layout = "_BasicMailLayout";
|
||||
}
|
||||
<p>
|
||||
Verify this email address for your Bitwarden account by clicking the following link. If you did not request this email to
|
||||
verify a Bitwarden account, you can safely ignore it.
|
||||
</p>
|
||||
<p><a href="@Raw(Model.Url)" target="_blank" clicktracking=off>@Model.Url</a></p>
|
@ -1,7 +0,0 @@
|
||||
@model Bit.Core.Models.Mail.VerifyEmailModel
|
||||
@{
|
||||
Layout = "_BasicMailLayout.text";
|
||||
}
|
||||
Verify this email address for your Bitwarden account by clicking the following link. If you did not request this email to verify a Bitwarden account, you can safely ignore it.
|
||||
|
||||
@Raw(Model.Url)
|
@ -1,101 +0,0 @@
|
||||
@model Bit.Core.Models.Mail.BaseMailModel
|
||||
@{
|
||||
Layout = "_MailLayout";
|
||||
}
|
||||
<table class="main" width="100%" cellpadding="0" cellspacing="0" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; -webkit-font-smoothing: antialiased; margin: 0; -webkit-text-size-adjust: none; border: 1px solid #e9e9e9; border-radius: 3px;" bgcolor="white">
|
||||
<tr style="margin: 0; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none;">
|
||||
<td class="content-wrap" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; margin: 0; -webkit-font-smoothing: antialiased; padding: 20px; -webkit-text-size-adjust: none;" valign="top">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" style="margin: 0; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none;">
|
||||
<tr style="margin: 0; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none;">
|
||||
<td class="content-block" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; margin: 0; -webkit-font-smoothing: antialiased; padding: 0 0 10px; -webkit-text-size-adjust: none;" valign="top">
|
||||
Thank you for creating an account with Bitwarden. You may now log in with your new account.
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="margin: 0; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none;">
|
||||
<td class="content-block" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; margin: 0; -webkit-font-smoothing: antialiased; padding: 0 0 10px; -webkit-text-size-adjust: none;" valign="top">
|
||||
Did you know that Bitwarden is free to sync with all of your devices? Download Bitwarden today on:
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="margin: 0; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none;">
|
||||
<td class="h3" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 18px; color: #333; line-height: 25px; margin: 0; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; font-weight: bold;" valign="top">
|
||||
Desktop
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="margin: 0; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none;">
|
||||
<td class="content-block" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; margin: 0; -webkit-font-smoothing: antialiased; padding: 0 0 10px; -webkit-text-size-adjust: none;" valign="top">
|
||||
Access Bitwarden on Windows, macOS, and Linux desktops with our native desktop application.
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="margin: 0; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none;">
|
||||
<td class="content-block" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; margin: 0; -webkit-font-smoothing: antialiased; padding: 0 0 10px; -webkit-text-size-adjust: none;" valign="top">
|
||||
<a href="https://bitwarden.com/#download" target="_blank" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #3c8dbc; line-height: 25px; margin: 0; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; text-decoration: underline;">
|
||||
<img src="https://bitwarden.com/images/mail-os.png" alt="Windows, macOS, and Linux" width="550" height="110" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; margin: 0; border: none; max-width: 100%; height: auto; display: block;" />
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="margin: 0; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none;">
|
||||
<td class="h3" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 18px; color: #333; line-height: 25px; margin: 0; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; font-weight: bold;" valign="top">
|
||||
Web Browser
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="margin: 0; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none;">
|
||||
<td class="content-block" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; margin: 0; -webkit-font-smoothing: antialiased; padding: 0 0 10px; -webkit-text-size-adjust: none;" valign="top">
|
||||
Integrate Bitwarden directly into your favorite browser. Use our browser extensions for a seamless browsing experience.
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="margin: 0; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none;">
|
||||
<td class="content-block" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; margin: 0; -webkit-font-smoothing: antialiased; padding: 0 0 10px; -webkit-text-size-adjust: none;" valign="top">
|
||||
<a href="https://bitwarden.com/#download-browser" target="_blank" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #3c8dbc; line-height: 25px; margin: 0; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; text-decoration: underline;">
|
||||
<img src="https://bitwarden.com/images/mail-browsers.png" alt="Chrome, Firefox, Opera, Edge, Safari, and more" width="550" height="90" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; margin: 0; border: none; max-width: 100%; height: auto; display: block;" />
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="margin: 0; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none;">
|
||||
<td class="h3" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 18px; color: #333; line-height: 25px; margin: 0; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; font-weight: bold;" valign="top">
|
||||
Mobile
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="margin: 0; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none;">
|
||||
<td class="content-block" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; margin: 0; -webkit-font-smoothing: antialiased; padding: 0 0 10px; -webkit-text-size-adjust: none;" valign="top">
|
||||
Take Bitwarden on the go with our mobile apps for your phone or tablet device.
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="margin: 0; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none;">
|
||||
<td class="content-block" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; margin: 0; -webkit-font-smoothing: antialiased; padding: 0 0 10px; -webkit-text-size-adjust: none;" valign="top">
|
||||
<a href="https://bitwarden.com/#download-mobile" target="_blank" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #3c8dbc; line-height: 25px; margin: 0; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; text-decoration: underline;">
|
||||
<img src="https://bitwarden.com/images/mail-stores.png" alt="App Store and Google Play" width="550" height="85" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; margin: 0; border: none; max-width: 100%; height: auto; display: block;" />
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="margin: 0; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none;">
|
||||
<td class="h3" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 18px; color: #333; line-height: 25px; margin: 0; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; font-weight: bold;" valign="top">
|
||||
Web
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="margin: 0; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none;">
|
||||
<td style="margin: 0; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none;" valign="top">
|
||||
Stuck without any of your devices? Using a friend's computer? You can access your Bitwarden vault from any web enabled device by using the web vault.
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="margin: 0; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none;">
|
||||
<td class="content-block h3 biglink" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 18px; color: #333; line-height: 25px; -webkit-font-smoothing: antialiased; margin: 0; -webkit-text-size-adjust: none; padding: 0 0 10px; font-weight: bold;" valign="top">
|
||||
<a target="_blank" href="@Raw(Model.WebVaultUrl)/?utm_source=welcome_email&utm_medium=email" style="-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; box-sizing: border-box; color: #3c8dbc; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 20px; line-height: 25px; margin: 0; text-decoration: underline;">@Raw(Model.WebVaultUrlHostname)</a>
|
||||
<br style="margin: 0; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none;" />
|
||||
<br style="margin: 0; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none;" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="margin: 0; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none;">
|
||||
<td class="content-block" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; margin: 0; -webkit-font-smoothing: antialiased; padding: 0 0 10px; -webkit-text-size-adjust: none;" valign="top">
|
||||
If you have any questions or problems you can email us from our website at <a target="_blank" href="https://bitwarden.com/contact/?utm_source=welcome_email&utm_medium=email" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #3c8dbc; line-height: 25px; margin: 0; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; text-decoration: underline;">https://bitwarden.com/contact</a>.
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="margin: 0; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none;">
|
||||
<td class="content-block last" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; margin: 0; -webkit-font-smoothing: antialiased; padding: 0; -webkit-text-size-adjust: none;" valign="top">
|
||||
Thank you!<br style="margin: 0; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none;" />
|
||||
The Bitwarden Team
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
@ -1,37 +0,0 @@
|
||||
@model Bit.Core.Models.Mail.BaseMailModel
|
||||
@{
|
||||
Layout = "_MailLayout.text";
|
||||
}
|
||||
Thank you for creating an account with Bitwarden. You may now log in with your new account.
|
||||
|
||||
Did you know that Bitwarden is free to sync with all of your devices? Download Bitwarden today on:
|
||||
|
||||
Desktop
|
||||
============
|
||||
|
||||
Access Bitwarden on Windows, macOS, and Linux desktops with our native desktop application.
|
||||
https://bitwarden.com/#download
|
||||
|
||||
Web Browser
|
||||
============
|
||||
|
||||
Integrate Bitwarden directly into your favorite browser. Use our browser extensions for a seamless browsing experience.
|
||||
https://bitwarden.com/#download-browser
|
||||
|
||||
Mobile
|
||||
============
|
||||
|
||||
Take Bitwarden on the go with our mobile apps for your phone or tablet device.
|
||||
https://bitwarden.com/#download-mobile
|
||||
|
||||
Web
|
||||
============
|
||||
|
||||
Stuck without any of your devices? Using a friend's computer? You can access your Bitwarden vault from any web enabled device by using the web vault.
|
||||
@Raw(Model.WebVaultUrl)/?utm_source=welcome_email&utm_medium=email
|
||||
|
||||
|
||||
If you have any questions or problems you can email us from our website at: https://bitwarden.com/contact/?utm_source=welcome_email&utm_medium=email
|
||||
|
||||
Thank you!
|
||||
The Bitwarden Team
|
@ -1,10 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
@RenderBody()
|
||||
</body>
|
||||
</html>
|
@ -1 +0,0 @@
|
||||
@RenderBody()
|
@ -1,136 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml" style="-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; box-sizing: border-box; color: #333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 25px; margin: 0;">
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>Bitwarden</title>
|
||||
</head>
|
||||
|
||||
<body style="-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; height: 100%; line-height: 25px; width: 100% !important;" bgcolor="#f6f6f6">
|
||||
<style type="text/css">
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
box-sizing: border-box;
|
||||
font-size: 16px;
|
||||
color: #333;
|
||||
line-height: 25px;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-webkit-text-size-adjust: none;
|
||||
}
|
||||
|
||||
body * {
|
||||
margin: 0;
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
box-sizing: border-box;
|
||||
font-size: 16px;
|
||||
color: #333;
|
||||
line-height: 25px;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-webkit-text-size-adjust: none;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
border: none;
|
||||
}
|
||||
|
||||
body {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-webkit-text-size-adjust: none;
|
||||
width: 100% !important;
|
||||
height: 100%;
|
||||
line-height: 25px;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: #f6f6f6;
|
||||
}
|
||||
|
||||
@@media only screen and (max-width: 600px) {
|
||||
body {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.container {
|
||||
padding: 0 !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.container-table {
|
||||
padding: 0 !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 0 0 10px 0 !important;
|
||||
}
|
||||
|
||||
.content-wrap {
|
||||
padding: 10px !important;
|
||||
}
|
||||
|
||||
.invoice {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.main {
|
||||
border-right: none !important;
|
||||
border-left: none !important;
|
||||
border-radius: 0 !important;
|
||||
}
|
||||
|
||||
.logo {
|
||||
padding-top: 10px !important;
|
||||
}
|
||||
|
||||
.footer {
|
||||
margin-top: 10px !important;
|
||||
}
|
||||
|
||||
.indented {
|
||||
padding-left: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<table class="body-wrap" cellpadding="0" cellspacing="0" style="-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; box-sizing: border-box; color: #333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 25px; margin: 0; width: 100%;" bgcolor="#f6f6f6">
|
||||
<tr style="-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; box-sizing: border-box; color: #333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 25px; margin: 0;">
|
||||
<td valign="middle" class="aligncenter middle logo" style="-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; box-sizing: border-box; color: #333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 25px; margin: 0; padding: 20px 0 10px;" align="center">
|
||||
<img src="https://bitwarden.com/images/logo-gray.png" alt="" width="250" height="39" style="-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; border: none; box-sizing: border-box; color: #333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 25px; margin: 0; max-width: 100%;" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; box-sizing: border-box; color: #333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 25px; margin: 0;">
|
||||
<td class="container" align="center" style="-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; box-sizing: border-box; clear: both !important; color: #333; display: block !important; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 25px; margin: 0 auto; max-width: 600px !important; width: 600px;" valign="top">
|
||||
<table cellpadding="0" cellspacing="0" class="container-table" style="-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; box-sizing: border-box; clear: both !important; color: #333; display: block !important; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 25px; margin: 0 auto; max-width: 600px !important; width: 600px;">
|
||||
<tr style="-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; box-sizing: border-box; color: #333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 25px; margin: 0;">
|
||||
<td class="content" align="center" style="-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; box-sizing: border-box; color: #333; display: block; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 0; line-height: 0; margin: 0 auto; max-width: 600px; padding-bottom: 20px;" valign="top">
|
||||
|
||||
@RenderBody()
|
||||
|
||||
<table class="footer" cellpadding="0" cellspacing="0" width="100%" style="-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; box-sizing: border-box; clear: both; color: #999; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 12px; line-height: 20px; margin: 15px 0 0; width: 100%;">
|
||||
<tr style="-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; box-sizing: border-box; color: #333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 25px; margin: 0;">
|
||||
<td class="aligncenter content-block" style="-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; box-sizing: border-box; color: #999; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 12px; line-height: 20px; margin: 0; padding: 0 0 10px;" align="center" valign="top">
|
||||
8bit Solutions LLC
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; box-sizing: border-box; color: #333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 25px; margin: 0;">
|
||||
<td class="aligncenter social-icons" align="center" style="-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; box-sizing: border-box; color: #999; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 12px; line-height: 20px; margin: 0;" valign="top">
|
||||
<table cellpadding="0" cellspacing="0" style="-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; box-sizing: border-box; color: #333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 25px; margin: 0 auto;">
|
||||
<tr style="-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; box-sizing: border-box; color: #333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 25px; margin: 0;">
|
||||
<td style="-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; box-sizing: border-box; color: #999; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 12px; line-height: 20px; margin: 0; padding: 0 10px;" valign="top"><a href="https://twitter.com/bitwarden_app" target="_blank" style="-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; box-sizing: border-box; color: #999; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 12px; line-height: 20px; margin: 0; text-decoration: underline;"><img src="https://bitwarden.com/images/mail-twitter.png" alt="Twitter" width="30" height="30" style="-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; border: none; box-sizing: border-box; color: #333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 25px; margin: 0; max-width: 100%;" /></a></td>
|
||||
<td style="-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; box-sizing: border-box; color: #999; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 12px; line-height: 20px; margin: 0; padding: 0 10px;" valign="top"><a href="https://www.facebook.com/bitwarden/" target="_blank" style="-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; box-sizing: border-box; color: #999; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 12px; line-height: 20px; margin: 0; text-decoration: underline;"><img src="https://bitwarden.com/images/mail-facebook.png" alt="Facebook" width="30" height="30" style="-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; border: none; box-sizing: border-box; color: #333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 25px; margin: 0; max-width: 100%;" /></a></td>
|
||||
<td style="-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; box-sizing: border-box; color: #999; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 12px; line-height: 20px; margin: 0; padding: 0 10px;" valign="top"><a href="https://plus.google.com/+bitwarden" target="_blank" style="-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; box-sizing: border-box; color: #999; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 12px; line-height: 20px; margin: 0; text-decoration: underline;"><img src="https://bitwarden.com/images/mail-gplus.png" alt="Google+" width="30" height="30" style="-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; border: none; box-sizing: border-box; color: #333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 25px; margin: 0; max-width: 100%;" /></a></td>
|
||||
<td style="-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; box-sizing: border-box; color: #999; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 12px; line-height: 20px; margin: 0; padding: 0 10px;" valign="top"><a href="https://github.com/bitwarden" target="_blank" style="-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; box-sizing: border-box; color: #999; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 12px; line-height: 20px; margin: 0; text-decoration: underline;"><img src="https://bitwarden.com/images/mail-github.png" alt="GitHub" width="30" height="30" style="-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; border: none; box-sizing: border-box; color: #333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 25px; margin: 0; max-width: 100%;" /></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
@ -1,9 +0,0 @@
|
||||
@RenderBody()
|
||||
----------------------------
|
||||
|
||||
8bit Solutions LLC
|
||||
|
||||
- Twitter: https://twitter.com/bitwarden_app
|
||||
- Facebook: https://www.facebook.com/bitwarden/
|
||||
- Google+: https://plus.google.com/+bitwarden
|
||||
- GitHub: https://github.com/bitwarden
|
@ -1,201 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Bit.Core.Models.Table;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Bit.Core.Services
|
||||
{
|
||||
public class BackupMailService : IMailService
|
||||
{
|
||||
private readonly IMailService _primaryMailService;
|
||||
private readonly IMailService _backupMailService;
|
||||
private readonly ILogger<BackupMailService> _logger;
|
||||
|
||||
public BackupMailService(
|
||||
GlobalSettings globalSettings,
|
||||
IMailDeliveryService mailDeliveryService,
|
||||
ILogger<BackupMailService> logger)
|
||||
{
|
||||
_primaryMailService = new RazorMailService(globalSettings, mailDeliveryService);
|
||||
_backupMailService = new MarkdownMailService(globalSettings, mailDeliveryService);
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public async Task SendVerifyEmailEmailAsync(string email, Guid userId, string token)
|
||||
{
|
||||
try
|
||||
{
|
||||
await _primaryMailService.SendVerifyEmailEmailAsync(email, userId, token);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
LogError(e);
|
||||
await _backupMailService.SendVerifyEmailEmailAsync(email, userId, token);
|
||||
}
|
||||
}
|
||||
|
||||
public async Task SendVerifyDeleteEmailAsync(string email, Guid userId, string token)
|
||||
{
|
||||
try
|
||||
{
|
||||
await _primaryMailService.SendVerifyDeleteEmailAsync(email, userId, token);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
LogError(e);
|
||||
await _backupMailService.SendVerifyDeleteEmailAsync(email, userId, token);
|
||||
}
|
||||
}
|
||||
|
||||
public async Task SendChangeEmailAlreadyExistsEmailAsync(string fromEmail, string toEmail)
|
||||
{
|
||||
try
|
||||
{
|
||||
await _primaryMailService.SendChangeEmailAlreadyExistsEmailAsync(fromEmail, toEmail);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
LogError(e);
|
||||
await _backupMailService.SendChangeEmailAlreadyExistsEmailAsync(fromEmail, toEmail);
|
||||
}
|
||||
}
|
||||
|
||||
public async Task SendChangeEmailEmailAsync(string newEmailAddress, string token)
|
||||
{
|
||||
try
|
||||
{
|
||||
await _primaryMailService.SendChangeEmailEmailAsync(newEmailAddress, token);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
LogError(e);
|
||||
await _backupMailService.SendChangeEmailEmailAsync(newEmailAddress, token);
|
||||
}
|
||||
}
|
||||
|
||||
public async Task SendTwoFactorEmailAsync(string email, string token)
|
||||
{
|
||||
try
|
||||
{
|
||||
await _primaryMailService.SendTwoFactorEmailAsync(email, token);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
LogError(e);
|
||||
await _backupMailService.SendTwoFactorEmailAsync(email, token);
|
||||
}
|
||||
}
|
||||
|
||||
public async Task SendMasterPasswordHintEmailAsync(string email, string hint)
|
||||
{
|
||||
try
|
||||
{
|
||||
await _primaryMailService.SendMasterPasswordHintEmailAsync(email, hint);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
LogError(e);
|
||||
await _backupMailService.SendMasterPasswordHintEmailAsync(email, hint);
|
||||
}
|
||||
}
|
||||
|
||||
public async Task SendNoMasterPasswordHintEmailAsync(string email)
|
||||
{
|
||||
try
|
||||
{
|
||||
await _primaryMailService.SendNoMasterPasswordHintEmailAsync(email);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
LogError(e);
|
||||
await _backupMailService.SendNoMasterPasswordHintEmailAsync(email);
|
||||
}
|
||||
}
|
||||
|
||||
public async Task SendOrganizationAcceptedEmailAsync(string organizationName, string userEmail,
|
||||
IEnumerable<string> adminEmails)
|
||||
{
|
||||
try
|
||||
{
|
||||
await _primaryMailService.SendOrganizationAcceptedEmailAsync(organizationName, userEmail, adminEmails);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
LogError(e);
|
||||
await _backupMailService.SendOrganizationAcceptedEmailAsync(organizationName, userEmail, adminEmails);
|
||||
}
|
||||
}
|
||||
|
||||
public async Task SendOrganizationConfirmedEmailAsync(string organizationName, string email)
|
||||
{
|
||||
try
|
||||
{
|
||||
await _primaryMailService.SendOrganizationConfirmedEmailAsync(organizationName, email);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
LogError(e);
|
||||
await _backupMailService.SendOrganizationConfirmedEmailAsync(organizationName, email);
|
||||
}
|
||||
}
|
||||
|
||||
public async Task SendOrganizationInviteEmailAsync(string organizationName, OrganizationUser orgUser, string token)
|
||||
{
|
||||
try
|
||||
{
|
||||
await _primaryMailService.SendOrganizationInviteEmailAsync(organizationName, orgUser, token);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
LogError(e);
|
||||
await _backupMailService.SendOrganizationInviteEmailAsync(organizationName, orgUser, token);
|
||||
}
|
||||
}
|
||||
|
||||
public async Task SendPasswordlessSignInAsync(string returnUrl, string token, string email)
|
||||
{
|
||||
try
|
||||
{
|
||||
await _primaryMailService.SendPasswordlessSignInAsync(returnUrl, token, email);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
LogError(e);
|
||||
await _backupMailService.SendPasswordlessSignInAsync(returnUrl, token, email);
|
||||
}
|
||||
}
|
||||
|
||||
public async Task SendWelcomeEmailAsync(User user)
|
||||
{
|
||||
try
|
||||
{
|
||||
await _primaryMailService.SendWelcomeEmailAsync(user);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
LogError(e);
|
||||
await _backupMailService.SendWelcomeEmailAsync(user);
|
||||
}
|
||||
}
|
||||
|
||||
public async Task SendInvoiceUpcomingAsync(string email, decimal amount, DateTime dueDate,
|
||||
List<string> items, bool mentionInvoices)
|
||||
{
|
||||
try
|
||||
{
|
||||
await _primaryMailService.SendInvoiceUpcomingAsync(email, amount, dueDate, items, mentionInvoices);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
LogError(e);
|
||||
await _backupMailService.SendInvoiceUpcomingAsync(email, amount, dueDate, items, mentionInvoices);
|
||||
}
|
||||
}
|
||||
|
||||
private void LogError(Exception e)
|
||||
{
|
||||
_logger.LogError(e, "Error sending mail with primary service, using backup.");
|
||||
}
|
||||
}
|
||||
}
|
@ -1,245 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Bit.Core.Models.Table;
|
||||
using Bit.Core.Models.Mail;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Reflection;
|
||||
using Bit.Core.Utilities;
|
||||
|
||||
namespace Bit.Core.Services
|
||||
{
|
||||
public class MarkdownMailService : IMailService
|
||||
{
|
||||
private const string Namespace = "Bit.Core.MailTemplates.Markdown";
|
||||
|
||||
private readonly GlobalSettings _globalSettings;
|
||||
private readonly IMailDeliveryService _mailDeliveryService;
|
||||
|
||||
public MarkdownMailService(
|
||||
GlobalSettings globalSettings,
|
||||
IMailDeliveryService mailDeliveryService)
|
||||
{
|
||||
_globalSettings = globalSettings;
|
||||
_mailDeliveryService = mailDeliveryService;
|
||||
}
|
||||
|
||||
public async Task SendVerifyEmailEmailAsync(string email, Guid userId, string token)
|
||||
{
|
||||
var model = new Dictionary<string, string>
|
||||
{
|
||||
["url"] = string.Format("{0}/verify-email?userId={1}&token={2}",
|
||||
_globalSettings.BaseServiceUri.VaultWithHash, userId, WebUtility.UrlEncode(token))
|
||||
};
|
||||
|
||||
var message = await CreateMessageAsync("Verify Your Email", email, "VerifyEmail", model);
|
||||
message.MetaData.Add("SendGridBypassListManagement", true);
|
||||
await _mailDeliveryService.SendEmailAsync(message);
|
||||
}
|
||||
|
||||
public async Task SendVerifyDeleteEmailAsync(string email, Guid userId, string token)
|
||||
{
|
||||
var model = new Dictionary<string, string>
|
||||
{
|
||||
["url"] = string.Format("{0}/verify-recover-delete?userId={1}&token={2}&email={3}",
|
||||
_globalSettings.BaseServiceUri.VaultWithHash,
|
||||
userId,
|
||||
WebUtility.UrlEncode(token),
|
||||
WebUtility.UrlEncode(email)),
|
||||
["email"] = WebUtility.HtmlEncode(email)
|
||||
};
|
||||
|
||||
var message = await CreateMessageAsync("Delete Your Account", email, "VerifyDelete", model);
|
||||
message.MetaData.Add("SendGridBypassListManagement", true);
|
||||
await _mailDeliveryService.SendEmailAsync(message);
|
||||
}
|
||||
|
||||
public async Task SendChangeEmailAlreadyExistsEmailAsync(string fromEmail, string toEmail)
|
||||
{
|
||||
var model = new Dictionary<string, string>
|
||||
{
|
||||
["fromEmail"] = WebUtility.HtmlEncode(fromEmail),
|
||||
["toEmail"] = WebUtility.HtmlEncode(toEmail),
|
||||
};
|
||||
|
||||
var message = await CreateMessageAsync("Your Email Change", toEmail, "ChangeEmailAlreadyExists", model);
|
||||
message.MetaData.Add("SendGridBypassListManagement", true);
|
||||
await _mailDeliveryService.SendEmailAsync(message);
|
||||
}
|
||||
|
||||
public async Task SendChangeEmailEmailAsync(string newEmailAddress, string token)
|
||||
{
|
||||
var model = new Dictionary<string, string>
|
||||
{
|
||||
["token"] = token
|
||||
};
|
||||
|
||||
var message = await CreateMessageAsync("Your Email Change", newEmailAddress, "ChangeEmail", model);
|
||||
message.MetaData.Add("SendGridBypassListManagement", true);
|
||||
await _mailDeliveryService.SendEmailAsync(message);
|
||||
}
|
||||
|
||||
public async Task SendTwoFactorEmailAsync(string email, string token)
|
||||
{
|
||||
var model = new Dictionary<string, string>
|
||||
{
|
||||
["token"] = token
|
||||
};
|
||||
|
||||
var message = await CreateMessageAsync("Your Two-step Login Verification Code", email, "TwoFactorEmail", model);
|
||||
message.MetaData.Add("SendGridBypassListManagement", true);
|
||||
await _mailDeliveryService.SendEmailAsync(message);
|
||||
}
|
||||
|
||||
public async Task SendMasterPasswordHintEmailAsync(string email, string hint)
|
||||
{
|
||||
var model = new Dictionary<string, string>
|
||||
{
|
||||
["hint"] = WebUtility.HtmlEncode(hint),
|
||||
["vaultUrl"] = _globalSettings.BaseServiceUri.VaultWithHash
|
||||
};
|
||||
|
||||
var message = await CreateMessageAsync("Your Master Password Hint", email, "MasterPasswordHint", model);
|
||||
message.MetaData.Add("SendGridBypassListManagement", true);
|
||||
await _mailDeliveryService.SendEmailAsync(message);
|
||||
}
|
||||
|
||||
public async Task SendNoMasterPasswordHintEmailAsync(string email)
|
||||
{
|
||||
var message = await CreateMessageAsync("Your Master Password Hint", email, "NoMasterPasswordHint", null);
|
||||
message.MetaData.Add("SendGridBypassListManagement", true);
|
||||
await _mailDeliveryService.SendEmailAsync(message);
|
||||
}
|
||||
|
||||
public async Task SendOrganizationAcceptedEmailAsync(string organizationName, string userEmail,
|
||||
IEnumerable<string> adminEmails)
|
||||
{
|
||||
var model = new Dictionary<string, string>
|
||||
{
|
||||
["userEmail"] = WebUtility.HtmlEncode(userEmail),
|
||||
["organizationName"] = WebUtility.HtmlEncode(organizationName)
|
||||
};
|
||||
|
||||
var message = await CreateMessageAsync($"User {userEmail} Has Accepted Invite", adminEmails,
|
||||
"OrganizationUserAccepted", model);
|
||||
message.MetaData.Add("SendGridBypassListManagement", true);
|
||||
await _mailDeliveryService.SendEmailAsync(message);
|
||||
}
|
||||
|
||||
public async Task SendOrganizationConfirmedEmailAsync(string organizationName, string email)
|
||||
{
|
||||
var model = new Dictionary<string, string>
|
||||
{
|
||||
["organizationName"] = WebUtility.HtmlEncode(organizationName)
|
||||
};
|
||||
|
||||
var message = await CreateMessageAsync($"You Have Been Confirmed To {organizationName}", email,
|
||||
"OrganizationUserConfirmed", model);
|
||||
message.MetaData.Add("SendGridBypassListManagement", true);
|
||||
await _mailDeliveryService.SendEmailAsync(message);
|
||||
}
|
||||
|
||||
public async Task SendOrganizationInviteEmailAsync(string organizationName, OrganizationUser orgUser, string token)
|
||||
{
|
||||
var model = new Dictionary<string, string>
|
||||
{
|
||||
["organizationName"] = WebUtility.HtmlEncode(organizationName),
|
||||
["url"] = string.Format("{0}/accept-organization?organizationId={1}&organizationUserId={2}" +
|
||||
"&email={3}&organizationName={4}&token={5}",
|
||||
_globalSettings.BaseServiceUri.VaultWithHash,
|
||||
orgUser.OrganizationId,
|
||||
orgUser.Id,
|
||||
WebUtility.UrlEncode(orgUser.Email),
|
||||
WebUtility.UrlEncode(organizationName),
|
||||
WebUtility.UrlEncode(token))
|
||||
};
|
||||
|
||||
var message = await CreateMessageAsync($"Join {organizationName}", orgUser.Email, "OrganizationUserInvited", model);
|
||||
message.MetaData.Add("SendGridBypassListManagement", true);
|
||||
await _mailDeliveryService.SendEmailAsync(message);
|
||||
}
|
||||
|
||||
public async Task SendWelcomeEmailAsync(User user)
|
||||
{
|
||||
var model = new Dictionary<string, string>
|
||||
{
|
||||
["vaultUrl"] = _globalSettings.BaseServiceUri.VaultWithHash
|
||||
};
|
||||
|
||||
var message = await CreateMessageAsync("Welcome", user.Email, "Welcome", model);
|
||||
await _mailDeliveryService.SendEmailAsync(message);
|
||||
}
|
||||
|
||||
public async Task SendPasswordlessSignInAsync(string returnUrl, string token, string email)
|
||||
{
|
||||
var url = CoreHelpers.ExtendQuery(new Uri($"{_globalSettings.BaseServiceUri.Admin}/login/confirm"),
|
||||
new Dictionary<string, string>
|
||||
{
|
||||
["returnUrl"] = returnUrl,
|
||||
["email"] = email,
|
||||
["token"] = token,
|
||||
});
|
||||
var model = new Dictionary<string, string>
|
||||
{
|
||||
["url"] = url.ToString()
|
||||
};
|
||||
|
||||
var message = await CreateMessageAsync("[Admin] Continue Logging In", email, "PasswordlessSignIn", model);
|
||||
message.MetaData.Add("SendGridBypassListManagement", true);
|
||||
await _mailDeliveryService.SendEmailAsync(message);
|
||||
}
|
||||
|
||||
public async Task SendInvoiceUpcomingAsync(string email, decimal amount, DateTime dueDate,
|
||||
List<string> items, bool mentionInvoices)
|
||||
{
|
||||
var model = new Dictionary<string, string>
|
||||
{
|
||||
["vaultUrl"] = _globalSettings.BaseServiceUri.VaultWithHash,
|
||||
["dueDate"] = dueDate.ToString("MMM dd, yyyy"),
|
||||
["amountDue"] = amount.ToString("C")
|
||||
};
|
||||
|
||||
var message = await CreateMessageAsync("Your Subscription Will Renew Soon", email,
|
||||
"InvoiceUpcoming", model);
|
||||
await _mailDeliveryService.SendEmailAsync(message);
|
||||
}
|
||||
|
||||
private async Task<MailMessage> CreateMessageAsync(string subject, string toEmail, string fileName,
|
||||
Dictionary<string, string> model)
|
||||
{
|
||||
return await CreateMessageAsync(subject, new List<string> { toEmail }, fileName, model);
|
||||
}
|
||||
|
||||
private async Task<MailMessage> CreateMessageAsync(string subject, IEnumerable<string> toEmails, string fileName,
|
||||
Dictionary<string, string> model)
|
||||
{
|
||||
var message = new MailMessage
|
||||
{
|
||||
ToEmails = toEmails,
|
||||
Subject = subject,
|
||||
MetaData = new Dictionary<string, object>()
|
||||
};
|
||||
|
||||
var assembly = typeof(MarkdownMailService).GetTypeInfo().Assembly;
|
||||
using(var s = assembly.GetManifestResourceStream($"{Namespace}.{fileName}.md"))
|
||||
using(var sr = new StreamReader(s))
|
||||
{
|
||||
var markdown = await sr.ReadToEndAsync();
|
||||
|
||||
if(model != null)
|
||||
{
|
||||
foreach(var prop in model)
|
||||
{
|
||||
markdown = markdown.Replace($"{{{{{prop.Key}}}}}", prop.Value);
|
||||
}
|
||||
}
|
||||
|
||||
message.HtmlContent = CommonMark.CommonMarkConverter.Convert(markdown);
|
||||
message.TextContent = markdown;
|
||||
}
|
||||
|
||||
return message;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,300 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Bit.Core.Models.Table;
|
||||
using RazorLight;
|
||||
using Bit.Core.Models.Mail;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using Bit.Core.Utilities;
|
||||
using RazorLight.Razor;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Bit.Core.Services
|
||||
{
|
||||
public class RazorMailService : IMailService
|
||||
{
|
||||
private readonly GlobalSettings _globalSettings;
|
||||
private readonly IRazorLightEngine _engine;
|
||||
private readonly IMailDeliveryService _mailDeliveryService;
|
||||
|
||||
public RazorMailService(
|
||||
GlobalSettings globalSettings,
|
||||
IMailDeliveryService mailDeliveryService)
|
||||
{
|
||||
_globalSettings = globalSettings;
|
||||
_mailDeliveryService = mailDeliveryService;
|
||||
|
||||
|
||||
var factory = new EngineFactory();
|
||||
_engine = factory.Create(new CustomEmbeddedRazorProject());
|
||||
}
|
||||
|
||||
public async Task SendVerifyEmailEmailAsync(string email, Guid userId, string token)
|
||||
{
|
||||
var message = CreateDefaultMessage("Verify Your Email", email);
|
||||
var model = new VerifyEmailModel
|
||||
{
|
||||
Token = WebUtility.UrlEncode(token),
|
||||
UserId = userId,
|
||||
WebVaultUrl = _globalSettings.BaseServiceUri.VaultWithHash,
|
||||
SiteName = _globalSettings.SiteName
|
||||
};
|
||||
message.HtmlContent = await _engine.CompileRenderAsync("VerifyEmail", model);
|
||||
message.TextContent = await _engine.CompileRenderAsync("VerifyEmail.text", model);
|
||||
message.MetaData.Add("SendGridBypassListManagement", true);
|
||||
|
||||
await _mailDeliveryService.SendEmailAsync(message);
|
||||
}
|
||||
|
||||
public async Task SendVerifyDeleteEmailAsync(string email, Guid userId, string token)
|
||||
{
|
||||
var message = CreateDefaultMessage("Delete Your Account", email);
|
||||
var model = new VerifyDeleteModel
|
||||
{
|
||||
Token = WebUtility.UrlEncode(token),
|
||||
UserId = userId,
|
||||
WebVaultUrl = _globalSettings.BaseServiceUri.VaultWithHash,
|
||||
SiteName = _globalSettings.SiteName,
|
||||
Email = email,
|
||||
EmailEncoded = WebUtility.UrlEncode(email)
|
||||
};
|
||||
message.HtmlContent = await _engine.CompileRenderAsync("VerifyDelete", model);
|
||||
message.TextContent = await _engine.CompileRenderAsync("VerifyDelete.text", model);
|
||||
message.MetaData.Add("SendGridBypassListManagement", true);
|
||||
|
||||
await _mailDeliveryService.SendEmailAsync(message);
|
||||
}
|
||||
|
||||
public async Task SendChangeEmailAlreadyExistsEmailAsync(string fromEmail, string toEmail)
|
||||
{
|
||||
var message = CreateDefaultMessage("Your Email Change", toEmail);
|
||||
var model = new ChangeEmailExistsViewModel
|
||||
{
|
||||
FromEmail = fromEmail,
|
||||
ToEmail = toEmail,
|
||||
WebVaultUrl = _globalSettings.BaseServiceUri.VaultWithHash,
|
||||
SiteName = _globalSettings.SiteName
|
||||
};
|
||||
message.HtmlContent = await _engine.CompileRenderAsync("ChangeEmailAlreadyExists", model);
|
||||
message.TextContent = await _engine.CompileRenderAsync("ChangeEmailAlreadyExists.text", model);
|
||||
await _mailDeliveryService.SendEmailAsync(message);
|
||||
}
|
||||
|
||||
public async Task SendChangeEmailEmailAsync(string newEmailAddress, string token)
|
||||
{
|
||||
var message = CreateDefaultMessage("Your Email Change", newEmailAddress);
|
||||
var model = new EmailTokenViewModel
|
||||
{
|
||||
Token = token,
|
||||
WebVaultUrl = _globalSettings.BaseServiceUri.VaultWithHash,
|
||||
SiteName = _globalSettings.SiteName
|
||||
};
|
||||
message.HtmlContent = await _engine.CompileRenderAsync("ChangeEmail", model);
|
||||
message.TextContent = await _engine.CompileRenderAsync("ChangeEmail.text", model);
|
||||
message.MetaData.Add("SendGridBypassListManagement", true);
|
||||
|
||||
await _mailDeliveryService.SendEmailAsync(message);
|
||||
}
|
||||
|
||||
public async Task SendTwoFactorEmailAsync(string email, string token)
|
||||
{
|
||||
var message = CreateDefaultMessage("Your Two-step Login Verification Code", email);
|
||||
var model = new EmailTokenViewModel
|
||||
{
|
||||
Token = token,
|
||||
WebVaultUrl = _globalSettings.BaseServiceUri.VaultWithHash,
|
||||
SiteName = _globalSettings.SiteName
|
||||
};
|
||||
message.HtmlContent = await _engine.CompileRenderAsync("TwoFactorEmail", model);
|
||||
message.TextContent = await _engine.CompileRenderAsync("TwoFactorEmail.text", model);
|
||||
message.MetaData.Add("SendGridBypassListManagement", true);
|
||||
|
||||
await _mailDeliveryService.SendEmailAsync(message);
|
||||
}
|
||||
|
||||
public async Task SendMasterPasswordHintEmailAsync(string email, string hint)
|
||||
{
|
||||
var message = CreateDefaultMessage("Your Master Password Hint", email);
|
||||
var model = new MasterPasswordHintViewModel
|
||||
{
|
||||
Hint = CoreHelpers.SanitizeForEmail(hint),
|
||||
WebVaultUrl = _globalSettings.BaseServiceUri.VaultWithHash,
|
||||
SiteName = _globalSettings.SiteName
|
||||
};
|
||||
message.HtmlContent = await _engine.CompileRenderAsync("MasterPasswordHint", model);
|
||||
message.TextContent = await _engine.CompileRenderAsync("MasterPasswordHint.text", model);
|
||||
await _mailDeliveryService.SendEmailAsync(message);
|
||||
}
|
||||
|
||||
public async Task SendNoMasterPasswordHintEmailAsync(string email)
|
||||
{
|
||||
var message = CreateDefaultMessage("Your Master Password Hint", email);
|
||||
var model = new BaseMailModel
|
||||
{
|
||||
WebVaultUrl = _globalSettings.BaseServiceUri.VaultWithHash,
|
||||
SiteName = _globalSettings.SiteName
|
||||
};
|
||||
message.HtmlContent = await _engine.CompileRenderAsync("NoMasterPasswordHint", model);
|
||||
message.TextContent = await _engine.CompileRenderAsync("NoMasterPasswordHint.text", model);
|
||||
await _mailDeliveryService.SendEmailAsync(message);
|
||||
}
|
||||
|
||||
public async Task SendOrganizationAcceptedEmailAsync(string organizationName, string userEmail,
|
||||
IEnumerable<string> adminEmails)
|
||||
{
|
||||
var message = CreateDefaultMessage($"User {userEmail} Has Accepted Invite", adminEmails);
|
||||
var model = new OrganizationUserAcceptedViewModel
|
||||
{
|
||||
OrganizationName = CoreHelpers.SanitizeForEmail(organizationName),
|
||||
UserEmail = userEmail,
|
||||
WebVaultUrl = _globalSettings.BaseServiceUri.VaultWithHash,
|
||||
SiteName = _globalSettings.SiteName
|
||||
};
|
||||
message.HtmlContent = await _engine.CompileRenderAsync("OrganizationUserAccepted", model);
|
||||
message.TextContent = await _engine.CompileRenderAsync("OrganizationUserAccepted.text", model);
|
||||
await _mailDeliveryService.SendEmailAsync(message);
|
||||
}
|
||||
|
||||
public async Task SendOrganizationConfirmedEmailAsync(string organizationName, string email)
|
||||
{
|
||||
var message = CreateDefaultMessage($"You Have Been Confirmed To {organizationName}", email);
|
||||
var model = new OrganizationUserConfirmedViewModel
|
||||
{
|
||||
OrganizationName = CoreHelpers.SanitizeForEmail(organizationName),
|
||||
WebVaultUrl = _globalSettings.BaseServiceUri.VaultWithHash,
|
||||
SiteName = _globalSettings.SiteName
|
||||
};
|
||||
message.HtmlContent = await _engine.CompileRenderAsync("OrganizationUserConfirmed", model);
|
||||
message.TextContent = await _engine.CompileRenderAsync("OrganizationUserConfirmed.text", model);
|
||||
await _mailDeliveryService.SendEmailAsync(message);
|
||||
}
|
||||
|
||||
public async Task SendOrganizationInviteEmailAsync(string organizationName, OrganizationUser orgUser, string token)
|
||||
{
|
||||
var message = CreateDefaultMessage($"Join {organizationName}", orgUser.Email);
|
||||
var model = new OrganizationUserInvitedViewModel
|
||||
{
|
||||
OrganizationName = CoreHelpers.SanitizeForEmail(organizationName),
|
||||
Email = WebUtility.UrlEncode(orgUser.Email),
|
||||
OrganizationId = orgUser.OrganizationId.ToString(),
|
||||
OrganizationUserId = orgUser.Id.ToString(),
|
||||
Token = WebUtility.UrlEncode(token),
|
||||
OrganizationNameUrlEncoded = WebUtility.UrlEncode(organizationName),
|
||||
WebVaultUrl = _globalSettings.BaseServiceUri.VaultWithHash,
|
||||
SiteName = _globalSettings.SiteName
|
||||
};
|
||||
message.HtmlContent = await _engine.CompileRenderAsync("OrganizationUserInvited", model);
|
||||
message.TextContent = await _engine.CompileRenderAsync("OrganizationUserInvited.text", model);
|
||||
await _mailDeliveryService.SendEmailAsync(message);
|
||||
}
|
||||
|
||||
public async Task SendWelcomeEmailAsync(User user)
|
||||
{
|
||||
var message = CreateDefaultMessage("Welcome", user.Email);
|
||||
var model = new BaseMailModel
|
||||
{
|
||||
WebVaultUrl = _globalSettings.BaseServiceUri.VaultWithHash,
|
||||
SiteName = _globalSettings.SiteName
|
||||
};
|
||||
message.HtmlContent = await _engine.CompileRenderAsync("Welcome", model);
|
||||
message.TextContent = await _engine.CompileRenderAsync("Welcome.text", model);
|
||||
await _mailDeliveryService.SendEmailAsync(message);
|
||||
}
|
||||
|
||||
public async Task SendPasswordlessSignInAsync(string returnUrl, string token, string email)
|
||||
{
|
||||
var message = CreateDefaultMessage("[Admin] Continue Logging In", email);
|
||||
|
||||
var url = CoreHelpers.ExtendQuery(new Uri($"{_globalSettings.BaseServiceUri.Admin}/login/confirm"),
|
||||
new Dictionary<string, string>
|
||||
{
|
||||
["returnUrl"] = returnUrl,
|
||||
["email"] = email,
|
||||
["token"] = token,
|
||||
});
|
||||
var model = new PasswordlessSignInModel
|
||||
{
|
||||
Url = url.ToString()
|
||||
};
|
||||
message.HtmlContent = await _engine.CompileRenderAsync("PasswordlessSignIn", model);
|
||||
message.TextContent = await _engine.CompileRenderAsync("PasswordlessSignIn.text", model);
|
||||
await _mailDeliveryService.SendEmailAsync(message);
|
||||
}
|
||||
|
||||
public async Task SendInvoiceUpcomingAsync(string email, decimal amount, DateTime dueDate,
|
||||
List<string> items, bool mentionInvoices)
|
||||
{
|
||||
var message = CreateDefaultMessage("Your Subscription Will Renew Soon", email);
|
||||
var model = new InvoiceUpcomingViewModel
|
||||
{
|
||||
WebVaultUrl = _globalSettings.BaseServiceUri.VaultWithHash,
|
||||
SiteName = _globalSettings.SiteName,
|
||||
AmountDue = amount,
|
||||
DueDate = dueDate,
|
||||
Items = items,
|
||||
MentionInvoices = mentionInvoices
|
||||
};
|
||||
message.HtmlContent = await _engine.CompileRenderAsync("InvoiceUpcoming", model);
|
||||
message.TextContent = await _engine.CompileRenderAsync("InvoiceUpcoming.text", model);
|
||||
await _mailDeliveryService.SendEmailAsync(message);
|
||||
}
|
||||
|
||||
private MailMessage CreateDefaultMessage(string subject, string toEmail)
|
||||
{
|
||||
return CreateDefaultMessage(subject, new List<string> { toEmail });
|
||||
}
|
||||
|
||||
private MailMessage CreateDefaultMessage(string subject, IEnumerable<string> toEmails)
|
||||
{
|
||||
return new MailMessage
|
||||
{
|
||||
ToEmails = toEmails,
|
||||
Subject = subject,
|
||||
MetaData = new Dictionary<string, object>()
|
||||
};
|
||||
}
|
||||
|
||||
public class CustomEmbeddedRazorProject : RazorLightProject
|
||||
{
|
||||
public override Task<RazorLightProjectItem> GetItemAsync(string templateKey)
|
||||
{
|
||||
if(string.IsNullOrWhiteSpace(templateKey))
|
||||
{
|
||||
throw new ArgumentNullException(nameof(templateKey));
|
||||
}
|
||||
|
||||
var item = new CustomEmbeddedRazorProjectItem(templateKey);
|
||||
return Task.FromResult(item as RazorLightProjectItem);
|
||||
}
|
||||
|
||||
public override Task<IEnumerable<RazorLightProjectItem>> GetImportsAsync(string templateKey)
|
||||
{
|
||||
return Task.FromResult(Enumerable.Empty<RazorLightProjectItem>());
|
||||
}
|
||||
}
|
||||
|
||||
public class CustomEmbeddedRazorProjectItem : RazorLightProjectItem
|
||||
{
|
||||
private readonly string _fullTemplateKey;
|
||||
private readonly Assembly _assembly;
|
||||
|
||||
public CustomEmbeddedRazorProjectItem(string key)
|
||||
{
|
||||
if(string.IsNullOrWhiteSpace(key))
|
||||
{
|
||||
throw new ArgumentNullException(nameof(key));
|
||||
}
|
||||
|
||||
Key = key;
|
||||
_assembly = GetType().Assembly;
|
||||
_fullTemplateKey = $"Bit.Core.MailTemplates.Razor.{key}.cshtml";
|
||||
}
|
||||
|
||||
public override string Key { get; set; }
|
||||
public override bool Exists => _assembly.GetManifestResourceNames().Any(f => f == _fullTemplateKey);
|
||||
public override Stream Read() => _assembly.GetManifestResourceStream(_fullTemplateKey);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user