Example: smtp_translate Simple Mail Transfer Vuser Functions (SMTP)

Translates messages to SMTP protocol.

int smtp_translate( char *filename, char *content_header, ENCODING_TYPE encoding, char *output_filename );
filename The file to translate to SMTP protocol.
content_header The content header.
encoding The encoding method to use for translation. The following methods are available: 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_filename The name of the file containing the translated message.

The smtp_translate 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 global sessions. For multiple sessions, use the smtp_translate_ex function, which allows you to specify a 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.