diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d2e347f..ba2a1245 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -* +* Context information `tos` in the Postmaster email handling ## [1.19.2] - 2024-01-17 diff --git a/src/netius/clients/smtp.py b/src/netius/clients/smtp.py index ce69ac6b..ad688426 100644 --- a/src/netius/clients/smtp.py +++ b/src/netius/clients/smtp.py @@ -517,21 +517,23 @@ def message( # this should provide some extra information on the agent if mark: contents = self.mark(contents) - # creates the context object that will be used to pass - # contextual information to the callbacks - context = dict( - froms = froms, - tos = tos, - contents = contents, - mark = mark, - comply = comply, - ensure_loop = ensure_loop - ) - # creates the method that is able to generate handler for a # certain sequence of to based (email) addresses def build_handler(tos, domain = None, tos_map = None): + # creates the context object that will be used to pass + # contextual information to the callbacks + context = dict( + froms = froms, + tos = tos, + contents = contents, + mark = mark, + comply = comply, + ensure_loop = ensure_loop, + domain = domain, + tos_map = tos_map + ) + def on_close(connection = None): # verifies if the current handler has been build with a # domain based clojure and if that's the case removes the