18 lines
500 B
Python
18 lines
500 B
Python
|
from django.core.mail import EmailMessage
|
||
|
from django.template.loader import render_to_string
|
||
|
|
||
|
|
||
|
def make_stripe_email(order) -> EmailMessage:
|
||
|
subject = 'Thanks for your sustainer payment!'
|
||
|
email_body = render_to_string(
|
||
|
'supporters/mail/sustainer_thanks.txt',
|
||
|
{'order': order},
|
||
|
).strip()
|
||
|
message = EmailMessage(
|
||
|
subject,
|
||
|
email_body,
|
||
|
'Software Freedom Conservancy <sustainers@sfconservancy.org>',
|
||
|
[order.email],
|
||
|
)
|
||
|
return message
|