bebleo / smtpdfix

A SMTP server for use as a pytest fixture that implements encryption and authentication.
MIT License
15 stars 5 forks source link

Allow setting config values through a dictionary #405

Open bebleo opened 1 month ago

bebleo commented 1 month ago

Because the setting of config values forces an individual reset each time I will like to be able to rest multiple values at once to avoid the time it takes to close the connection and create a new one.

A method that allows for the config values to be set using a dictionary or multiple variables that will unset the event handler(s), make the changes, and then reset and trigger the event handler(s).

An alternative would be to simply document setting and unsetting the event handlers but this feels cumbersome. The alternative would be to write a ConfigHelper class, but while the code would be, potentially cleaner, the underlying process would not.