Unable to read email body text content using IMAP library


I’m currently facing an issue while getting email body content. I used the get email body keyword to read mail body content and store the content into a variable while logging the variable I found some characters are getting inserted into content like =, some special characters.
If the email content is 155°F(68°C) it’s getting value as 155B0F(68B0C) etc…

Please any help me on this issue

Probably B0 is the hexadecimal code for the symbol º.

I don’t know the IMAP library but you should look, for MIME encoding, or related. Emails content is translated to ASCII and then email readers translate back to the correct characters code.

If you can control this logic, you can use Python code to “correct” the email content.

Hi Helio,

Do you know any of the python code to handle this logic.So i call this in robot framework script

No, I do not.

This is a bit of research from your side. First try to confirm that the email is encoded and search for Python code how to handle. You can also take a look to IMAP Library code, and you may expand it to solve your problem.