Jump to main content

##

# TCPIP_SMTPC_ATTACH_BUFFER Structure

## C

    typedef struct {
        TCPIP_SMTPC_ATTACH_TYPE attachType;
        TCPIP_SMTPC_ENCODE_TYPE attachEncode;
    const char* attachName;
    const uint8_t* attachBuffer;
    size_t attachSize;
    } TCPIP_SMTPC_ATTACH_BUFFER;

## Description

Structure: TCPIP_SMTPC_ATTACH_BUFFER

This data structure describes a mail buffer attachment.

## Members

Members | Description
--- | ---
attachType | Type of the contained data.
attachEncode | Preferred encoding.
attachName | File name to be used for the attachment.
attachBuffer | Buffer containing the data.
attachSize | Buffer size.

## Remarks

A buffer attachment is attached to the email just like a file. But data is taken from the persistent user buffer rather than from a file.

If the attach type is application octet stream then the suggested encoding will be overwritten and BASE64 encoding will be used.

The user supplied buffer has to be persistent until the mail completion callback will be called.