Hey,
I was wondering if it is possible to resend a booking email that has previously been sent 2 days prior to the start date on the booking form. I have a set up custom form with sendgrid that comes to me and my client upon booking
I’m wondering how easy it is to have the form (or another template) be resent 2 days prior to the start date on the form, is this on the wix side or sendgrid side?
Also, a separate question, can a PDF or PDF link be attached to the booking form??
Thank you!
Hey there
The PDF question can hopefully be solved if you dig into this thread:
About resending stuff using code and sendgrid you will have to store the email you sent the first time or the data at least and then you will have to make a scheduler that shoots the same code again that you use when they book.
My take on that would be to make a function in the http-functions.js file that will check your bookings and if it is 2 days to go then resend the mail in that function. If not just go on to the next client booking.
To make the scheduler execute at least once a day automatically you can use Free cronjobs - from minutely to once a year. - cron-job.org or similar service to execute your function inside the http-functions.js file. If you make a function called get_checkbookings inside that file you can execute it by calling https:/www.yourdomain.com/_functions/checkbookings in the cron job and set it to run like once or twice a day.
Just remember when you have sent out the second email you must mark that AS SENT so you won’t send the same mail to the same person twice if you execute it more than once a day.
More about how to work with http-functions
I hope this will get you started. Happy coding.