1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-02 08:32:50 -05:00

License expiration email for self-hosted org/premium accounts

This commit is contained in:
Matt Portune
2020-05-18 16:06:34 -04:00
parent e71617886a
commit 2cf7f18858
8 changed files with 62 additions and 0 deletions

View File

@ -278,6 +278,18 @@ namespace Bit.Core.Services
message.Category = "AddedCredit";
await _mailDeliveryService.SendEmailAsync(message);
}
public async Task SendLicenseExpiredAsync(IEnumerable<string> emails, bool isOrganization)
{
var message = CreateDefaultMessage("License Expired", emails);
var model = new LicenseExpiredViewModel
{
IsOrganization = isOrganization
};
await AddMessageContentAsync(message, "LicenseExpired", model);
message.Category = "LicenseExpired";
await _mailDeliveryService.SendEmailAsync(message);
}
public async Task SendNewDeviceLoggedInEmail(string email, string deviceType, DateTime timestamp, string ip)
{