1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-22 12:15:36 +01:00

noop mail deli service and moved back to sendgrid

This commit is contained in:
Kyle Spearrin 2017-06-16 14:24:04 -04:00
parent 06ca566be1
commit 5e9fc6b969
2 changed files with 15 additions and 3 deletions

View File

@ -0,0 +1,13 @@
using System.Threading.Tasks;
using Bit.Core.Models.Mail;
namespace Bit.Core.Services
{
public class NoopMailDeliveryService : IMailDeliveryService
{
public Task SendEmailAsync(MailMessage message)
{
return Task.FromResult(0);
}
}
}

View File

@ -14,7 +14,6 @@ using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.WindowsAzure.Storage;
using System.Security.Claims;
using SqlServerRepos = Bit.Core.Repositories.SqlServer;
namespace Bit.Core.Utilities
@ -47,8 +46,7 @@ namespace Bit.Core.Utilities
public static void AddDefaultServices(this IServiceCollection services)
{
//services.AddSingleton<IMailService, SendGridTemplateMailService>();
services.AddSingleton<IMailService, RazorViewMailService>();
services.AddSingleton<IMailService, SendGridTemplateMailService>();
services.AddSingleton<IMailDeliveryService, SendGridMailDeliveryService>();
services.AddSingleton<IPushNotificationService, NotificationHubPushNotificationService>();
services.AddSingleton<IBlockIpService, AzureQueueBlockIpService>();
@ -60,6 +58,7 @@ namespace Bit.Core.Utilities
public static void AddNoopServices(this IServiceCollection services)
{
services.AddSingleton<IMailService, NoopMailService>();
services.AddSingleton<IMailDeliveryService, NoopMailDeliveryService>();
services.AddSingleton<IPushNotificationService, NoopPushNotificationService>();
services.AddSingleton<IBlockIpService, NoopBlockIpService>();
services.AddSingleton<IPushRegistrationService, NoopPushRegistrationService>();