示例#1
0
        public async Task ExecuteAsync(SendModel model)
        {
            var smtp = new SmtpClient();
            var config = await _getHostConfigurationService.ExecuteAsync();

            var message = new MailMessage
            {
                Subject = "Your message from hit.antix.co.uk",
                Body = string.Format(
                    "Please click the link {0}{1}{2}",
                    config.RootUrl, "/hit/",
                    model.ClientConnectionId)
            };

            message.To.Add(new MailAddress(model.Email));

            _log.Information(m => m("Sending Email: {0}", model.Email));
            smtp.Send(message);
        }
示例#2
0
 public async Task Post (SendModel model)
 {
     await _sendService.ExecuteAsync(model);
 }