serilog-sinks-email icon indicating copy to clipboard operation
serilog-sinks-email copied to clipboard

How to send email to multiple recipients?

Open raysefo opened this issue 2 years ago • 6 comments

Hi, I tried this way but no emails were sent, is there a way to send it to multiple recipients?

{
        "Name": "CustomEmail",
        "Args": {
          "ConnectionInfo": {
            "NetworkCredentials": {
             
              "UserName": "[email protected]",
              "Password": "1234"
            },
            "FromEmail": "[email protected]",
            "MailServer": "smtp.gmail.com",
            "EmailSubject": "[{Level}] Multiple Requests",
            "Port": "465",
            "IsBodyHtml": false,
            "EnableSsl": true,
            "ToEmail": "[email protected]; [email protected]",
            "RestrictedToMinimumLevel": "Error",
            "OutputTemplate": "{Timestamp:yyyy-MM-dd HH:mm} [{Level}] {Message}{NewLine}{Exception}"
          }

        }
      }

raysefo avatar Jun 01 '23 11:06 raysefo

Those configurations below did not help either. (Using 2.4 version)

`"ToEmail": "[email protected]; [email protected]"

"ToEmail": "[email protected], [email protected]"`

raysefo avatar Jun 07 '23 05:06 raysefo

I think you may need to remove the spaces after the commas/semicolons. This looks like a bug, would be great to confirm.

nblumhardt avatar Dec 23 '23 06:12 nblumhardt