-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b9dc0a2
commit 97832d6
Showing
3 changed files
with
25 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
* Abhishek Ram <[email protected]> @abhishek-ram | ||
* Chad Gates @chadgates | ||
* Bruno Ribeiro da Silva <[email protected]> @loop0 | ||
* Robin C Samuel @robincsamuel | ||
- Abhishek Ram <[email protected]> @abhishek-ram | ||
- Chad Gates @chadgates | ||
- Bruno Ribeiro da Silva <[email protected]> @loop0 | ||
- Robin C Samuel @robincsamuel | ||
- Brandon Joyce @brandonjoyce |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -330,6 +330,7 @@ def build( | |
content_type="application/edi-consent", | ||
additional_headers=None, | ||
disposition_notification_to="[email protected]", | ||
message_id=None, | ||
): | ||
|
||
"""Function builds the AS2 message. Compresses, signs and encrypts | ||
|
@@ -354,6 +355,10 @@ def build( | |
:param disposition_notification_to: | ||
Email address for disposition-notification-to header entry. | ||
(default "[email protected]") | ||
:param message_id: | ||
The message id to be used for the message. If not provided a | ||
unique message id is generated. (default None) | ||
""" | ||
|
||
# Validations | ||
|
@@ -372,10 +377,13 @@ def build( | |
"Encryption of messages is enabled but encrypt key is not set for the receiver." | ||
) | ||
|
||
# Generate message id using UUID 1 as it uses both hostname and time | ||
self.message_id = ( | ||
email_utils.make_msgid(domain=self.sender.domain).lstrip("<").rstrip(">") | ||
) | ||
if message_id: | ||
self.message_id = message_id | ||
else: | ||
# Generate message id using UUID 1 as it uses both hostname and time | ||
self.message_id = ( | ||
email_utils.make_msgid(domain=self.sender.domain).lstrip("<").rstrip(">") | ||
) | ||
|
||
# Set up the message headers | ||
as2_headers = { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters