1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 15:42:48 -05:00

markdown mail service when self hosted

This commit is contained in:
Kyle Spearrin
2017-08-16 10:59:13 -04:00
parent 8af74bd0e4
commit 50a522bbd7
42 changed files with 342 additions and 35 deletions

View File

@ -54,7 +54,15 @@ namespace Bit.Core.Utilities
public static void AddDefaultServices(this IServiceCollection services, GlobalSettings globalSettings)
{
services.AddSingleton<IMailService, RazorViewMailService>();
if(globalSettings.SelfHosted)
{
services.AddSingleton<IMailService, MarkdownMailService>();
}
else
{
services.AddSingleton<IMailService, RazorMailService>();
}
services.AddSingleton<ILicensingService, RsaLicensingService>();
if(CoreHelpers.SettingHasValue(globalSettings.Mail.SendGridApiKey))