diff --git a/app/mailers/mailbot.rb b/app/mailers/mailbot.rb index c535f4aa..7b521c8d 100644 --- a/app/mailers/mailbot.rb +++ b/app/mailers/mailbot.rb @@ -23,10 +23,16 @@ class Mailbot < ActionMailer::Base attachments["ticket_for_#{@conference.short_title}_#{physical_ticket.id}.pdf"] = pdf.render end + template_name = 'ticket_confirmation_template' + YTLF_TICKET_ID = 50 + if @ticket_purchase.ticket_id = YTLF_TICKET_ID + template_name = 'young_thinkers_ticket_confirmation_template' + end + mail(to: @user.email, bcc: SNAPCON_BCC_ADDRESS, from: @conference.contact.email, - template_name: 'ticket_confirmation_template', + template_name: template_name, subject: "#{@conference.title} | Ticket Confirmation and PDF!") end diff --git a/app/views/mailbot/young_thinkers_ticket_confirmation_template.text.erb b/app/views/mailbot/young_thinkers_ticket_confirmation_template.text.erb new file mode 100644 index 00000000..e3e52c1f --- /dev/null +++ b/app/views/mailbot/young_thinkers_ticket_confirmation_template.text.erb @@ -0,0 +1,10 @@ +Dear <%= @user.name %>, + +Thanks! You have successfully booked <%= @ticket_purchase.quantity %> <%= @ticket_purchase.ticket.title %> ticket(s) for the event <%= @conference.title %>. Your transaction id is <%= @ticket_purchase.id %>. + +Please, find the ticket(s) pdf attached. + +The SAP Young Thinkers team will reach out to you with information on how to participate in the event soon. In the meantime, you can check the event page (https://events.sap.com/yt-learning-festival-at-snapcon-2020/en/home) or send an email with your questions to youngthinkers@sap.com. + +Best wishes, +<%= @conference.title %> Team