Skip to content

Added LocalDomain for setting Mailkit parameter of same name. #149

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

rkramer1964
Copy link

Added LocalDomain for setting Mailkit parameter of same name. Fixed failing test that needs to NOT send eagerly

…ailing test that needs to NOT send eagerly
@nblumhardt
Copy link
Member

Thanks for sending this one. MailKit has rather a lot of configuration options, I'm wondering whether, instead of adding all of these, the Options type in this project might just need a ConfigureSmtpClient callback which can be used to interact with the MailKit SmtpClient?

@rkramer1964
Copy link
Author

rkramer1964 commented Apr 19, 2025 via email

@rkramer1964
Copy link
Author

rkramer1964 commented Apr 20, 2025 via email

@nblumhardt
Copy link
Member

Thanks for the suggestions! I think where possible, we should lean on Serilog's existing functionality for dynamic tasks like filtering or parameterisation.

For example, returning a bool from the callback would achieve what's already possible via WriteTo.Conditional(..), which has the advantages of working properly in conjunction with batching, and which saves some cycles by short-circuiting before events get to the underlying sink infrastructure.

Dynamically changing the subject could similarly be achieved using WriteTo.Map(..) (from Serilog.Sinks.Map), and this also works better with orthogonal features like batching.

@rkramer1964
Copy link
Author

rkramer1964 commented Apr 22, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants