mirror of
https://github.com/pretix/pretix.git
synced 2026-08-08 10:27:49 +00:00
[wip] revert changes to orders.py
This commit is contained in:
@@ -2912,8 +2912,7 @@ class OrderPosition(AbstractPosition):
|
||||
def send_mail(self, subject: str, template: Union[str, LazyI18nString],
|
||||
context: Dict[str, Any]=None, log_entry_type: str='pretix.event.order.email.sent',
|
||||
user: User=None, headers: dict=None, sender: str=None, invoices: list=None,
|
||||
auth=None, attach_tickets=False, attach_ical=False, attach_other_files: list = None,
|
||||
diff_recipient=None):
|
||||
auth=None, attach_tickets=False, attach_ical=False, attach_other_files: list=None):
|
||||
"""
|
||||
Sends an email to the attendee. Basically, this method does two things:
|
||||
|
||||
@@ -2931,15 +2930,14 @@ class OrderPosition(AbstractPosition):
|
||||
:param sender: Custom email sender.
|
||||
:param attach_tickets: Attach tickets of this order, if they are existing and ready to download
|
||||
:param attach_ical: Attach relevant ICS files
|
||||
:param diff_recipient: A different recipient in case of unpersonalized add-ons.
|
||||
"""
|
||||
from pretix.base.services.mail import mail
|
||||
|
||||
if not self.attendee_email and not self.diff_recipient:
|
||||
if not self.attendee_email:
|
||||
return
|
||||
|
||||
with language(self.order.locale, self.order.event.settings.region):
|
||||
recipient = self.attendee_email if self.attendee_email else self.diff_recipient
|
||||
recipient = self.attendee_email
|
||||
outgoing_mail = mail(
|
||||
recipient, subject, template, context,
|
||||
self.event, self.order.locale, order=self.order, headers=headers, sender=sender,
|
||||
|
||||
Reference in New Issue
Block a user