How do you test production emails?

Hi,

We are sending emails. Recently an error started occurring because of Ahoy and when clicking on a link in the email the user gets “Link expired”.

This only happens on production. I was wondering how would you test this to avoid such regressions? (not, I don’t know what is the issue still, but It occurs only on production)

Are you linking to compiled assets (sprockets) by any chance? If so, these links will break over time as those assets are garbage collected between deploys.

I don’t understand how the question about linking to compiled assets is related? Could you help me understand?

Sorry, I might have misread the question. I had a problem once where I was linking to compiled sprockets assets (e.g. a documentation PDF) in an email, but since an email can be viewed a long time into the future we can’t link to assets that eventually get deleted say if the PDF file’s contents changes and it gets a new hash in its name.

Probably nothing to do with your particular problem though. I’m not familiar with Ahoy.