Example: smtp_translate_exSimple Mail Transfer Vuser Functions (SMTP)

Translates messages to SMTP protocol for a specific session.

int smtp_translate_ex( SMTP *ppsmtp,char *filename, char *content_header, ENCODING_TYPE encoding, char *output_filename );
ppsmtpA session identifier.
filenameThe file to translate to SMTP protocol.
content_headerThe content header.
encodingThe encoding method to use for translation. UNKNOWN_ENCODING – Unknown (AutoDetect) ASCII_7BIT – 7–bit QUOTED_PRINTABLE –quoted–printable characters. BASE64_ENCODED– base 64 RAW_CONTENT – Send file as is. The file must have its own header
output_filenameThe name of the file containing the translated message.

The smtp_translate_ex function translates messages for SMTP server. You specify the source and target files, the content header and the encoding type.

This function is for use with multiple sessions. For global sessions, use the smtp_translate function, which leaves out the session identifier.

Return Values

If this function succeeds, it returns LR_PASS. Otherwise, it returns LR_FAIL.


All arguments of this function of the type char, can be parameterized with standard parameterization.