Search code examples
emailimapmimehotmail

IMAP4 message with error


I'm storing all emails from the IMAP4 server and when I try to fetch them, some emails come with (at least I assume it is) an error:

* 4 FETCH (RFC822.HEADER {247} @!$#redirect: :{KMachine}:/home/d1/hds/ml/F8DA37B7-3A4F-4B01-B41F-A78D43B44690:13890::Equipe do MSN Hotmail::Wed, 06 Jul 2005 00:00:01 -0800::MSN Hotmail com mais espaço em breve!::[email protected] MIME-Version: 1.0 Content-Type: text/plain

Does anyone know how to get the original email? Or if this is actually the email? If so what about the unique id?

When I search for the email on hotmail, they only display emails from 2 months after those I'm fetching.


Solution

  • That is not an error, that is the raw message header.

    If so what about the unique id?

    The unique id is not part of the headers. If you want the unique id, you'll have to request that from the IMAP server in the FETCH request.

    For example:

    a0 FETCH 4 (RFC822.HEADER UID)