serilog / serilog-sinks-email

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

Dynamic to address #36

Closed itlackey closed 6 months ago

itlackey commented 7 years ago

Is there any way to use a property of the event to determine the to address for this sink?

nblumhardt commented 7 years ago

Hi - are there a small, fixed, number of addresses? If so, https://github.com/serilog/serilog-sinks-map could be used for this. Any luck?

itlackey commented 7 years ago

I had not seen this before. Since trying to pull in a single address this looks like it may work. I will try to give it a shot tomorrow and report back.

Thanks!

ghost commented 6 years ago

We are new to serilog, but really would like to have a solution for dynamic to addresses at somehow as a parameter.

nblumhardt commented 6 years ago

@dbol55 have you tried Serilog.Sinks.Map? Feedback on how it fits to your scenario would be useful. Thanks!

ghost commented 6 years ago

Thank you for response. I might misunderstanded the comment a small, fixed number. I will check it out as one perhaps might could inject a dynamic email through this sink. If you have a code example if would be appreciated 👍

nblumhardt commented 6 months ago

Closing this as stale, but still open to ideas around this.