Skip to content
This repository was archived by the owner on Jun 9, 2024. It is now read-only.

Commit dda3a27

Browse files
authored
Add configuration set name to SES emails (#9)
1 parent 40f21ab commit dda3a27

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

pythonit_toolkit/emails/backends/ses.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def send_email(
3131
Template=f"pythonit-{self.environment}-{template}",
3232
TemplateData=json.dumps(variables),
3333
ReplyToAddresses=reply_to,
34+
ConfigurationSetName='primary',
3435
)
3536

3637
def encode_vars(self, variables: dict[str, str]) -> dict[str, str]:

tests/emails/backends/test_ses.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ async def _():
2222
Template="pythonit-production-reset-password",
2323
TemplateData='{"subject": "Subject", "a": "b", "c": "d"}',
2424
ReplyToAddresses=[],
25+
ConfigurationSetName='primary',
2526
)
2627

2728

@@ -41,6 +42,7 @@ async def _():
4142
Template="pythonit-production-reset-password",
4243
TemplateData='{"subject": "Subject"}',
4344
ReplyToAddresses=[],
45+
ConfigurationSetName='primary',
4446
)
4547

4648

@@ -67,6 +69,7 @@ async def _():
6769
"test1@placeholder.com",
6870
"test2@placeholder.com",
6971
],
72+
ConfigurationSetName='primary',
7073
)
7174

7275

@@ -89,4 +92,5 @@ async def _():
8992
Template="pythonit-production-reset-password",
9093
TemplateData='{"subject": "Subject", "a": "<a href="https://google.it">link</a>"}',
9194
ReplyToAddresses=[],
95+
ConfigurationSetName='primary',
9296
)

0 commit comments

Comments
 (0)