private async Task SendMessageAsync(MailMessage message, SmtpMailClient mailClient) { Condition.Requires(mailClient).IsNotNull(); var messageToSend = FormatMessage(message); await mailClient.SendAsync(messageToSend); }
private void SendMessage(MailMessage message, SmtpMailClient mailClient) { Condition.Requires(mailClient).IsNotNull(); var messageToSend = FormatMessage(message); mailClient.Send(messageToSend); }