Aram Boyajyan
Aram Boyajyan

Reputation: 844

Read encrypted emails with IMAP

I'm reading a mail box using IMAP functions in PHP.

Regular emails are opened properly and all information is parsed as it should.

However, encrypted emails just return a really long string, even though the same email is readable in the web client (Roundcube) without any problems.

How can I read these encrypted emails? Is there any flag or function I should be using instead of the imap_fetchbody()?

Thanks!

Upvotes: 1

Views: 781

Answers (1)

Max
Max

Reputation: 10985

They are probably quoted printable or base64 encoded. Check the content transfer encoding header, and you should be able to decode them with appropriate functions.

Upvotes: 2

Related Questions