ec_message_part_extract

March 26, 2020 Contributors

Name

ec_message_part_extract — Prepare to extract a message part in a streaming fashion

Synopsis

#include "ec_message.h"

| io_object * **ec_message_part_extract** ( | part, |   |
|   | desired_charset); |   |

ec_message_part * <var class="pdparam">part</var>;
const char * <var class="pdparam">desired_charset</var>;

Description

Note

This reference page was automatically generated from functions found in the header files in the development branch. The function described here may not exist in generally available versions of Momentum, and may change in behavior when it is generally available. Consult your vendor for definitive advice on the use of this function.

Prepare to extract a message part in a streaming fashion.

Parameters

part

the message part to be extracted

desired_charset

the character set to use for textual parts.

If desired_charset is NULL, then no decoding will be performed; the stream will simply return the message part as it appears in the body.

If desired_charset is "/transfer-decode-only/" then only transfer decoding will be performed; the stream will supply the octets after decoding the transfer-encoding for that part.

Return Values

Returns an io_object that will produce the decoded part when read.

While the io_object returned from this function is active, you should not perform operations on the message that might seek the io object that underpins the message, otherwise you will confuse the extractor or vice versa.

Related Constants

EC_MSG_RENDER_OMIT_DOT

omit the trailing SMTP termination dot from the rendition

EC_MSG_RENDER_CALCULATE_LENGTH_ONLY

calculate the length only

EC_MSG_RENDER_HEADERS_ONLY

render the rfc2822 headers only

EC_MSG_RENDER_XML

render the output in an XML based format

EC_MSG_RENDER_OMIT_HEADERS

don’t render the rfc2822 headers

EC_MSG_RENDER_OMIT_EPILOGUE

don’t include epilogue

EC_MSG_RENDER_UNSTUFFED

remove SMTP dot stuffing while rendering, and use LF instead of CRLF

EC_MSG_RENDER_DEBUG

enable additional output in debugging mode

EC_MSG_RENDER_AVOID_IO

don’t incur disk IO if we can avoid it

EC_MSG_RENDER_SUPPRESS_WRITE_ERRORS

don’t log write errors, useful when rendering to a static string to limit the amount of the message being requested