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

Multiline subject fails to send mail

Open mgrosperrin opened this issue 6 years ago • 1 comments

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.

mgrosperrin avatar Jul 11 '18 08:07 mgrosperrin

Sounds good @mgrosperrin!

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

adamchester avatar Jul 11 '18 11:07 adamchester