serilog / serilog-sinks-email

A Serilog sink that writes events to SMTP email
Apache License 2.0
73 stars 68 forks source link

Multiline subject fails to send mail #53

Closed mgrosperrin closed 3 months ago

mgrosperrin commented 6 years ago

Thanks to #26, we can add {Message} in the subject. Unfortunately, if {Message} is multiline, the mail will not be send (because subject cannot have multiline).

Is it possible to update the EmailSink to keep only the first line of the subject before sending the email ?

Can help with a PR if needed.

adamchester commented 6 years ago

Sounds good @mgrosperrin!

I wonder if it would be better to strip new lines or only keep the first line?