Long links inside an email are not returned correctly when getting via Mailsac API

Hi Mailsac team,

We started using Mailsac a few weeks ago and loving your app. Great work :+1:

We just found a bug in the get email message metadata API endpoint (Mailsac API Specification). In our email message, there are 2 very long links which are exactly the same (“Log in” and “click here”).


But in the response of the API request to the above endpoint, the links array contain 2 different links. The first link is only part of the second link. It looks like the first link was cut in the middle of it.

You can find the message that I mentioned by looking at the message id 3p8inSAXlL3jccuEmbZDs9Pdwo-0

Thanks and looking forward to your response!

Hello Trungthan,

I found the message and looked at the raw SMTP. Both the links in the email appear complete. I didn’t actually diff them, but I did spot check a few of the strings within the links.

The links are parsed when the email is received. The values in the database reflect the values that were returned by the API. I’m going to loop engineering in on this one.

Thanks for taking the time to post on the forums. I truly appreciate it.

1 Like

Hi Trungthan,

I’ve added some tests to our code and verified the issue is reproducible. We have a fix deployed to a non-production environment. We are still conducting some testing on it, but hopefully we will have this fix deployed to production by the start of next week.

Thanks again for reporting this bug.

1 Like

Hi Michael,

Thanks for the quick response and action on this! You guys are awesome :+1:

Cheers,

Hi @trungthan , give it another go. Thanks for pointing out this issue. It was a chance for us to review decade-old mailsac code, and bolster test coverage in that area.