2024-10-24 06:51:49 +00:00
|
|
|
from django.core.mail import EmailMessage
|
|
|
|
from django.template.loader import render_to_string
|
|
|
|
|
|
|
|
|
|
|
|
def make_stripe_email(order) -> EmailMessage:
|
2024-11-15 08:24:49 +00:00
|
|
|
subject = 'Thanks for being a sustainer!'
|
2024-10-24 06:51:49 +00:00
|
|
|
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
|