So I have a website similar to an e-commerce site. I want to send out an email to the user after session expiry(preferably 30min after expiry), with dynamic content - with respect to their status, i.e. if they have items in their cart, if they haven't paid, or if the payment was successful.
So there are three questions here?
- What are different ways to achieve this?
- Is it possible to run a section of code after 30min of session expiration?
- Is it possible to put an if-else statement to the mail delivery depending on the user status?
Currently, I'm using Rails 5.0.0, and sendgrid to send emails. Sendgrid has codes like Mail.deliver_after(30 mins). But I can't seem to put an if else condition to make the content of the email dynamic. Also, I want to send the email after 30 mins after session expiry.
What are different ways to achieve this?
Is it possible to run a section of code after 30min of session expiration?
Is it possible to put an if-else statement to the mail delivery depending on the user status?