Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions app/api/helpers/mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,11 +335,13 @@ def send_email_to_attendees(order, purchaser_id, attachments=None):
action=TICKET_PURCHASED,
subject=MAILS[TICKET_PURCHASED]['subject'].format(
event_name=order.event.name,
invoice_id=order.invoice_number
invoice_id=order.invoice_number,
frontend_url=get_settings()['frontend_url']
),
html=MAILS[TICKET_PURCHASED]['message'].format(
pdf_url=holder.pdf_url,
event_name=order.event.name
event_name=order.event.name,
frontend_url=get_settings()['frontend_url']
),
attachments=attachments
)
Expand All @@ -366,11 +368,13 @@ def send_order_cancel_email(order):
action=TICKET_CANCELLED,
subject=MAILS[TICKET_CANCELLED]['subject'].format(
event_name=order.event.name,
invoice_id=order.invoice_number
invoice_id=order.invoice_number,
frontend_url=get_settings()['frontend_url']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe in other issue, but this needs to be in context processor

),
html=MAILS[TICKET_CANCELLED]['message'].format(
event_name=order.event.name,
order_url=make_frontend_url('/orders/{identifier}'.format(identifier=order.identifier)),
cancel_note=order.cancel_note
cancel_note=order.cancel_note,
frontend_url=get_settings()['frontend_url']
)
)
8 changes: 5 additions & 3 deletions app/api/helpers/system_mails.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
MONTHLY_PAYMENT_FOLLOWUP_EMAIL, EVENT_IMPORTED, EVENT_IMPORT_FAIL, TICKET_PURCHASED_ORGANIZER, TICKET_CANCELLED, \
TICKET_PURCHASED_ATTENDEE, PASSWORD_CHANGE, PASSWORD_RESET_AND_VERIFY, USER_EVENT_ROLE, TEST_MAIL



MAILS = {
EVENT_PUBLISH: {
'recipient': 'Owner, Organizer, Speaker',
Expand Down Expand Up @@ -157,7 +159,7 @@
u"<br/>Your order has been processed successfully." +
u"<br/> You can find your Tickets and Order Invoice attached to this mail."
u"<br><br><em>Looking forward to seeing you at the event."
u"<br/>Login to manage your orders at https://eventyay.com </em>"
u"<br/>Login to manage your orders at {frontend_url} </em>"
)
},
TICKET_PURCHASED_ATTENDEE: {
Expand All @@ -178,7 +180,7 @@
u"Hi, {buyer_email} just bought tickets for the event {event_name}"
u"<br/>The order has been processed successfully." +
u"<br/> <a href='{order_url}'>Click here</a> to view/download the invoice."
u"<br/>Login to manage the orders at https://eventyay.com </em>"
u"<br/>Login to manage the orders at {frontend_url} </em>"
)
},
TICKET_CANCELLED: {
Expand All @@ -189,7 +191,7 @@
u"<br/>Please contact the organizer for more info" +
u"<br/>Message from the organizer: {cancel_note}"
u"<br/> <a href='{order_url}'>Click here</a> to view/download the invoice."
u"<br/>Login to manage the orders at https://eventyay.com </em>"
u"<br/>Login to manage the orders at {frontend_url} </em>"
)
},
EVENT_EXPORTED: {
Expand Down