Skip to content

Instantly share code, notes, and snippets.

@yogat3ch
Last active August 9, 2022 15:23
Show Gist options
  • Save yogat3ch/c44037579747e163b928a07b73cb7ef2 to your computer and use it in GitHub Desktop.
Save yogat3ch/c44037579747e163b928a07b73cb7ef2 to your computer and use it in GitHub Desktop.
The Night to Remember Email
out <- list(
greeting = glue::glue("Dearest {`first_name`},"),
text = if (rsvp %|% FALSE) {
c("We're excited
and delighted,
that you'll be there,
for this wedding affair.",
"You stated your plans as follows:",
htmltools::doRenderTags(shiny::tags$ul(list_to_li(purrr::imap(.x, ~paste0(.y, ": ", .x))))),
"If all looks good, we'll await your arrival,
but if you need to make any changes,
please take a moment to <a href='http://wereloving.themindful.life/#rsvp' target='_blank'>fill out the form</a> once more.")
} else if (is.na(rsvp)) {
c("The time has come",
"to get your head out of your bum",
"and let us know if you will come.",
"If you can",
"we'll be tickled pink",
"but if you can't",
"Let us know at <a href='http://wereloving.themindful.life/#rsvp' target='_blank'>this link</a>.",
"If you've notified us via other means, but haven't filled out the RSVP form - please do so! This will enable us to have food and cake for you to eat!")
},
hotel = c("<h4>Hotel Guests</h4>",
"If you plan to stay in a hotel we have a discount for wedding guests at the Hampton Inn.",
"2461 North Columbia St",
"Milledgeville, GA 31061",
"You can use <a href='https://www.hilton.com/en/book/reservation/deeplink/?ctyhocn=MCNMLHX&groupCode=CHHIHW&arrivaldate=2022-10-08&departuredate=2022-10-09&cid=OM,WW,HILTONLINK,EN,DirectLink&fromId=HILTONLINKDIRECT' target='_blank'>this direct booking link</a> to book your room, or request a discounted room for the Holsenbeck/Isaac Wedding when you call."),
faq = c("If you have unanswered questions please check the ", "<a href='http://wereloving.themindful.life/#faq' target='_blank'>FAQ</a>."),
attire = c("We encourage fun costumes and comfortable outfits!")
carpool = if (any(carpool_needed))
c("<h4>Carpool Coordination Request</h4>",
"We see that you've requested a carpool and we want to confirm that the arrival & departure details are accurate such that we can coordinate a ride for you. If the details below need updating, please let us know by replying to this email.",
purrr::imap_chr(carpool_requests[ carpool_needed, - 1], ~paste0(.y,": ", .x, "\n"))
),
carpool_rides = "If you will have space in your vehicle when coming to the event and are open to starting the celebrations early with some of the guests requesting carpools, please reply to this email and let us know how many seats and cubic footage for luggage you will have! If you are considering requesting a carpool, but haven't yet requested one, you can find the form here."
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment