Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Reads and structures a message previously retrieved from a POP3 server.

...

Files

...

pop3-c.h/pop3-c.c

...

...

Prototype

...

...

rowspan5

...

Arguments

...

msg_buf Buffer containing a message received with POP3c_MsgRetrieve().

...

...

buf_size Size of msg_buf.

...

msg Pointer to POP3c_MSG structure being filled by this function.

...

perr Pointer to a variable that will hold the return error code from this function:

...

...

POP3c_ERR_NONE

...

POP3c_ERR_INCOMPLETE_MSG

...

Returned Values

...

None.

...

...

Required Configuration

...

None.

...

Notes / Warnings

...

...

From RFC #2822 (Internet Message Format), Section ‘Lexical Analysis of Messages : General Description’, “The body is simply a sequence of characters that follows the header and is separated from the header by an empty line (i.e., a line with nothing preceding the CRLF)”. Hence, GetLine() will return a length of 2 when it encounters that delimitation.

...

Characters <CRLF> are not copied into the various structure’s header fields. Instead, a ‘\

...

0character is appended.

...

The leading WSP (after the comma) is (are) not copied into the various structure’s header fields.

...

If the character ‘\

...

0is found in the msg_buf before the end of the header, it means that buffer, and hence the message, is incomplete. However, there is no way to know if the message body was complete. One should always check the return value of POP3c_MsgRetrieve() for confirmation.

...

Example Usage

...

See section 3-3 “µC/POP3c Example Code”

...

.