Skip to content

Commit

Permalink
Removed unreachable code for sending with SendGrid (dotnet#1824)
Browse files Browse the repository at this point in the history
`new SendGrid.Web(credentials)` can throw an exception, but it can't evaluate to null.
  • Loading branch information
breyed authored and spboyer committed Aug 30, 2016
1 parent 268bbef commit 66d2be4
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,7 @@ public Task SendEmailAsync(string email, string subject, string message)
Options.SendGridKey);
// Create a Web transport for sending email.
var transportWeb = new SendGrid.Web(credentials);
// Send the email.
if (transportWeb != null)
{
return transportWeb.DeliverAsync(myMessage);
}
else
{
return Task.FromResult(0);
}
return transportWeb.DeliverAsync(myMessage);
}

public Task SendSmsAsync(string number, string message)
Expand Down

0 comments on commit 66d2be4

Please sign in to comment.