1
0
mirror of https://github.com/bitwarden/server synced 2025-12-21 02:33:30 +00:00

SmtpMailDeliveryService

This commit is contained in:
Kyle Spearrin
2017-05-30 22:40:02 -04:00
parent 07c5f45ae0
commit 0ee863c1d0
4 changed files with 68 additions and 6 deletions

View File

@@ -15,8 +15,13 @@ namespace Bit.Core.Services
public SendGridMailDeliveryService(GlobalSettings globalSettings)
{
if(globalSettings.Mail?.SendGridApiKey == null)
{
throw new ArgumentNullException(nameof(globalSettings.Mail.SendGridApiKey));
}
_globalSettings = globalSettings;
_client = new SendGridClient(_globalSettings.Mail.ApiKey);
_client = new SendGridClient(_globalSettings.Mail.SendGridApiKey);
}
public async Task SendEmailAsync(MailMessage message)