datalust/seq-app-htmlemail

Email+ - Add optional CC and BCC fields

Opened this issue · 7 comments

Add an optional setting to Email+ instances to set one or more CC or BCC addresses to emails with the standard Handlebars support. We currently achieve a similar effect by creating a duplicate Email+ instance with a different set of addresses, but this quickly becomes unmanageable.

Hi! Thanks for the note. To make sure everything lines up, can you please let us know what the source data that you would be templating over would look like? I.e. how would the addresses be formatted based on the log data? Thanks!

Thanks for the quick reply! I was thinking just having a comma-separated field of email addresses, exactly the same as the "To address" field. Addresses that come from log data could use standard Handlebars syntax to input log event properties directly without any formatting.

Do you have an example of what you mean by formatting addresses based on log data? Maybe I'm not understanding the question properly.

Hi! Thanks for your reply - sorry, I was mistaken in thinking the current TO box didn't support templates, I see that it now does, so please ignore my question :-)

We'll give this one some thought; thanks 👍

I've published https://www.nuget.org/packages/Seq.App.EmailPlus-Enhanced/ to Nuget as a test package.

This has the code from my two open pull requests, which allows for testing of the enhanced code.

This includes the option for CC, BCC, and ReplyTo fields. Handlebars syntax is supported as per To address.

That's great - thanks for the follow-up, @MattMofDoom 👍

@nblumhardt No problem. I actually used it to fix a prod problem for me that really needed the ReplyTo and CC fields in particular.

Thanks, @MattMofDoom!