Skip to content

Commit

Permalink
add personalization_values kwarg
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed Jun 14, 2024
1 parent 5bc14d3 commit 0186f41
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions codeforlife/user/models/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,18 @@ def remove_contact_from_dot_digital(self):
mail.remove_contact(self.email)

# pylint: disable-next=arguments-differ
def email_user(self, campaign_id: int, **kwargs): # type: ignore[override]
def email_user( # type: ignore[override]
self,
campaign_id: int,
personalization_values: t.Optional[t.Dict[str, str]] = None,
**kwargs,
):
kwargs["to_addresses"] = [self.email]
mail.send_mail(campaign_id=campaign_id, **kwargs)
mail.send_mail(
campaign_id=campaign_id,
personalization_values=personalization_values,
**kwargs,
)


# pylint: disable-next=missing-class-docstring,too-few-public-methods
Expand Down

0 comments on commit 0186f41

Please sign in to comment.