public async Task SendTestEmail(SendTestEmailInput input)
        {
            var subject = L("TestEmail_Subject");
            var body    = L("TestEmail_Body");

            await _emailSender.SendAsync(input.EmailAddress, subject, body);
        }
 public virtual async Task SendTestEmailAsync(SendTestEmailInput input)
 {
     await RequestAsync(nameof(SendTestEmailAsync), new ClientProxyRequestTypeValue
     {
         { typeof(SendTestEmailInput), input }
     });
 }
Ejemplo n.º 3
0
 public async Task SendTestEmail(SendTestEmailInput input)
 {
     await _emailSender.SendAsync(
         input.EmailAddress,
         L("TestEmail_Subject"),
         L("TestEmail_Body")
         );
 }
Ejemplo n.º 4
0
 public async Task SendTestEmail(SendTestEmailInput input)
 {
     try
     {
         await _emailSender.SendAsync(
             input.EmailAddress,
             L("TestEmail_Subject"),
             L("TestEmail_Body")
             );
     }
     catch (Exception e)
     {
         throw new UserFriendlyException("An error was encountered while sending an email. " + e.Message, e);
     }
 }
 public async Task SendTestEmail(SendTestEmailInput input)
 {
     try
     {
         await _emailSender.SendAsync(
             input.EmailAddress,
             L("TestEmail_Subject"),
             L("TestEmail_Body")
             );
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
         throw;
     }
 }
        public async Task SendEmailKH(SendTestEmailInput input)

        {
            string    date      = DateTime.Today.ToString("dd-MM-yyyy");
            EmailInfo emailInfo = new EmailInfo();

            CoreEmailSender = new CoreEmailSender();
            MailAddress to   = new MailAddress(input.EmailAddress);
            MailAddress from = new MailAddress(input.mailForm);

            MailMessage message = new MailMessage(from, to);

            message.Subject = input.subject;
            message.Body    = input.body;
            message.Dispose();
            if (input.filedinhkem == null)
            {
                emailInfo.dataAttach = null;
                emailInfo.isAttach   = false;
            }
            else
            {
                var          path = Path.Combine(_env.WebRootPath, date, input.curentTime, input.filedinhkem);
                MemoryStream ms   = new MemoryStream(File.ReadAllBytes(path));
                emailInfo.dataAttach = ms;
                emailInfo.isAttach   = true;
            }

            emailInfo.nameAttach  = input.filedinhkem;
            emailInfo.Subj        = input.subject;
            emailInfo.Message     = input.body;
            emailInfo.ToEmail     = input.EmailAddress;
            emailInfo.smtpAddress = input.diaChiIP;
            emailInfo.portNumber  = input.congSMTP;
            emailInfo.enableSSL   = false;
            emailInfo.password    = input.matKhau;
            emailInfo.emailFrom   = input.mailForm;
            emailInfo.displayName = input.tenTruyCap;

            //ms.Position = 0;
            CoreEmailSender.SendEmail(emailInfo);
        }
Ejemplo n.º 7
0
 public Task SendTestEmailAsync(SendTestEmailInput input)
 {
     return(_emailSettingsAppService.SendTestEmailAsync(input));
 }
Ejemplo n.º 8
0
    public virtual async Task SendTestEmailAsync(SendTestEmailInput input)
    {
        await CheckFeatureAsync();

        await EmailSender.SendAsync(input.SenderEmailAddress, input.TargetEmailAddress, input.Subject, input.Body);
    }