From 5e9fc6b969da846dd138cb3b33ea74ba8b74ddb2 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 16 Jun 2017 14:24:04 -0400 Subject: [PATCH] noop mail deli service and moved back to sendgrid --- .../NoopImplementations/NoopMailDeliveryService.cs | 13 +++++++++++++ src/Core/Utilities/ServiceCollectionExtensions.cs | 5 ++--- 2 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 src/Core/Services/NoopImplementations/NoopMailDeliveryService.cs diff --git a/src/Core/Services/NoopImplementations/NoopMailDeliveryService.cs b/src/Core/Services/NoopImplementations/NoopMailDeliveryService.cs new file mode 100644 index 000000000..68d82be6d --- /dev/null +++ b/src/Core/Services/NoopImplementations/NoopMailDeliveryService.cs @@ -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); + } + } +} diff --git a/src/Core/Utilities/ServiceCollectionExtensions.cs b/src/Core/Utilities/ServiceCollectionExtensions.cs index d3709bbfb..14f9962d3 100644 --- a/src/Core/Utilities/ServiceCollectionExtensions.cs +++ b/src/Core/Utilities/ServiceCollectionExtensions.cs @@ -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(); - services.AddSingleton(); + services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); @@ -60,6 +58,7 @@ namespace Bit.Core.Utilities public static void AddNoopServices(this IServiceCollection services) { services.AddSingleton(); + services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); services.AddSingleton();