Skip to content

Commit 98bd762

Browse files
committed
Add event date to ticket email
1 parent 0645dbb commit 98bd762

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

src/email/email.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,13 +175,15 @@ func SendTicketPurchaseEmail(toAddress string, toName string, ticket *models.Tic
175175

176176
type TicketPurchaseEmailData struct {
177177
EventName string
178+
EventDate time.Time
178179
Name string
179180
Email string
180181
CodeURL string
181182
TicketURL string
182183
}
183184
contents, err := renderTemplate("email_ticket_purchase.html", TicketPurchaseEmailData{
184185
EventName: event.Name,
186+
EventDate: event.StartTime,
185187
Name: ticket.OwnerName,
186188
Email: ticket.OwnerEmail,
187189
CodeURL: hmnurl.BuildTicketQRCode(ticket.ID.String()),

src/templates/src/email_ticket_purchase.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<p>When you arrive, present the code below to gain entry to the venue.</p>
66
<p class="b">Ticket details:</p>
77
<ul>
8+
<li><b>Event date:</b> {{ absoluteshortdate .EventDate }}
89
<li><b>Name:</b> {{ .Name }}</li>
910
<li><b>Email:</b> {{ .Email }}</li>
1011
</ul>

0 commit comments

Comments
 (0)