Exemplo n.º 1
0
        private async Task SendMessageAsync(MailMessage message, SmtpMailClient mailClient)
        {
            Condition.Requires(mailClient).IsNotNull();

            var messageToSend = FormatMessage(message);

            await mailClient.SendAsync(messageToSend);
        }
Exemplo n.º 2
0
        private void SendMessage(MailMessage message, SmtpMailClient mailClient)
        {
            Condition.Requires(mailClient).IsNotNull();

            var messageToSend = FormatMessage(message);

            mailClient.Send(messageToSend);
        }