Serilog - email sink multiple recipients?

Cenk 956 Reputation points
2023-06-03T04:14:36.3833333+00:00

Hi guys,

I am trying to send emails to multiple recipients with Serilog but couldn't figure it out. Any help, please?

{
        "Name": "CustomEmail",
        "Args": {
          "ConnectionInfo": {
            "NetworkCredentials": {
             
              "UserName": "support@support.com",
              "Password": "12345"
            },
            "FromEmail": "support@support.com",
            "MailServer": "smtp.gmail.com",
            "EmailSubject": "[{Level}] Purchase Razer Codes Multiple Requests",
            "Port": "465",
            "IsBodyHtml": false,
            "EnableSsl": true,
            "ToEmail": "test1@gmail.com, test2@gmail.com",
            "RestrictedToMinimumLevel": "Error",
            "OutputTemplate": "{Timestamp:yyyy-MM-dd HH:mm} [{Level}] {Message}{NewLine}{Exception}"
          }

        }
      }
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,207 questions
{count} votes