ruby-on-railsrubyemailrubygemsahoy

Rails ahoy_email gem url broken sometimes


For my work, I was using ahoy_email gem to help analysis email status. It works fine and very helpful.

But sometime the url link were not successful redirect to correct url address.

For example:

Suppose my email has a link, google homepage url:

https://www.google.com

When I sent the mail, it packaged the link which in the email template by ahoy message gem, it looks like:

https://mail-center.mycompany.com/ahoy/messages/4Kwe4f3xsie1u70ybsYYUc8l3klW1v10/click?signature=5047051b3f2730e64af700b6acecee42ad4cc086&url=https://www.google.com

mail-center.mycompany.com is my server site, and this link suppose to go through to my mail server and redirect to google homepage when user clicked the link.

But very very rare, the link was broken. It did not redirect to the google homepage but to the https://mail-center.mycompany.com homepage.

It is hard to reproduced the situation, others email looks fine..

How could I fix or check the problem?

My rails project:


Solution

  • I am facing the exact same problem and honestly now fed up. The only thing i can point you to is: This probably happens when -

    On checking multiple times, correct url is being generated by Ahoy but for some reason (randomly/rarely), this is happening

    I hope it makes sense about what may be causing the issue.