Open Closed

ASP net Core multiple recipient #10455


0
logitsolutions created

**Dotnet Core + Angular

Version 10.3

**

While try to send Emails to multiple recipient ,not working

Dotnet Core

await _emailSender.SendAsync(new MailMessage{To = { "recvr1@gmail.com", "recvr2@gmail.com" },Subject = subject,Body = emailTemplate.ToString(),IsBodyHtml = true});

Email not receiving at recipients but when we give a single email address its working


1 Answer(s)
  • 0
    ismcagdas created
    Support Team

    Hi,

    Could you try this way ?

    var message = new MailMessage{To = { "recvr1@gmail.com" },Subject = subject,Body = emailTemplate.ToString(),IsBodyHtml = true};
    message..To.Add(new MailAddress("recvr2@gmail.com"));