Not getting correct response for email body using API

Hello Mailsac Team,

I hope this message finds you well. I am currently working on testing OTP functionality and have encountered a discrepancy that I’m seeking assistance with.

Scenario: I am in the process of testing OTP (One-Time Password) implementation. The main challenge I am encountering is that the content of the email received in my Mailsac inbox does not match what I am retrieving through the API code.

Initially, I received the correct response for the first attempt, as shown in the attached screenshot below:

Please find the screenshot attached.

However, subsequent attempts to retrieve the OTP through the API have resulted in inconsistent content being fetched, which does not match the expected OTP content. This inconsistency has been a hurdle in my testing process.

I kindly request your guidance and support in resolving this issue. Your expertise and assistance in ensuring the consistency of the OTP email content between the Mailsac inbox and API responses would be greatly appreciated.

Thank you for your time and assistance.

Hello theitguy,

Thank you for providing a detailed example. I was able to find you the message you referenced in our database.

The REST endpoint you are using is to return the plaintext version of your email. The email you sent has an HTML section and a plaintext section. The example response you had is showing the plaintext portion of the email.

You should either update your plaintext section of the email to contain the same information as the HTML portion or use one of the REST endpoints that return the HTML section of your email. Sanitized HTML REST Endpoint
Unsanitized HTML REST Endpoint

I noticed you redacted the email you were sending to in your screenshot. All email sent to email addresses hosted on mailsac is public by default unless the address is marked as private or is a part of a custom domain. Any of our paid plans will get you to tools needed to keep your emails private and free from throttling.

Hope my response helpful, let me know if I can be of any further assistance,
Michael

Hello mjmayer,

I wanted to express my sincere gratitude for your swift and effective support. Your timely assistance truly made a difference. Following the steps you provided, I was able to successfully implement the changes and achieve the desired results.

Your expertise and guidance have been invaluable. I have seamlessly integrated the adjustments into my code, aligning it with the updated HTML response format. I’m pleased to share that everything is now functioning smoothly and with the desired precision.

Your commitment to promptly addressing my concerns has not gone unnoticed. I deeply appreciate your dedication to ensuring that my technical challenges were met with prompt solutions.

Once again, thank you for your outstanding assistance. Your contributions have greatly contributed to the success of this endeavor.

Best regards,
TheITGuy

1 Like

Hi theitguy,

You are very welcome. I’m glad I could be of assistance,