Set FROM field on emails (#55)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Fixes #54 Reviewed-on: #55 Co-authored-by: Benjamin Bach <benjamin@overtag.dk> Co-committed-by: Benjamin Bach <benjamin@overtag.dk>
This commit is contained in:
parent
f5feda3414
commit
43d5dcbd52
|
@ -101,6 +101,7 @@ class InviteEmail(BaseEmail):
|
||||||
def __init__(self, membership: Membership, request: HttpRequest, *args, **kwargs) -> None:
|
def __init__(self, membership: Membership, request: HttpRequest, *args, **kwargs) -> None:
|
||||||
self.membership = membership
|
self.membership = membership
|
||||||
kwargs["user"] = membership.user
|
kwargs["user"] = membership.user
|
||||||
|
kwargs["from_email"] = "kasserer@data.coop"
|
||||||
super().__init__(request, *args, **kwargs)
|
super().__init__(request, *args, **kwargs)
|
||||||
|
|
||||||
def get_context_data(self) -> dict:
|
def get_context_data(self) -> dict:
|
||||||
|
@ -118,6 +119,7 @@ class OrderEmail(BaseEmail):
|
||||||
def __init__(self, order: Order, request: HttpRequest, *args, **kwargs) -> None:
|
def __init__(self, order: Order, request: HttpRequest, *args, **kwargs) -> None:
|
||||||
self.order = order
|
self.order = order
|
||||||
kwargs["user"] = order.member
|
kwargs["user"] = order.member
|
||||||
|
kwargs["from_email"] = "kasserer@data.coop"
|
||||||
super().__init__(request, *args, **kwargs)
|
super().__init__(request, *args, **kwargs)
|
||||||
|
|
||||||
def get_context_data(self) -> dict:
|
def get_context_data(self) -> dict:
|
||||||
|
|
Loading…
Reference in a new issue