imap_set_max_param_len_ex
| Internet Messaging Functions (IMAP) |
Sets the maximum buffer size to store a parameter value.
int imap_set_max_param_len_ex( IMAP *ppimap, char *size );
| ppimap | A session identifier. |
| size | The buffer size in bytes. |
Use imap_set_max_param_len_ex to set the maximum size of the buffer used to store a message as a parameter. It is invoked before the function which saves the message to a parameter (imap_fetch_ex and imap_search).
This function is used in a session. The global function is imap_set_max_param_len.
Return Values
On success, returns actual buffer size that was set. Otherwise, returns 0.
Parameterization
All arguments of this function of the type char, can be parameterized with standard parameterization.
Example
The following example saves the message to a parameter "Message" using the saveto parameter. imap_set_max_param_len indicates the size of the buffer to hold the message.
imap_set_max_param_len_ex(&imap2,"16384");
imap_fetch_ex(&imap2, "FetchMessages", "Mode=UID",
"Fetch=3 (UID RFC822.SIZE BODY[]<0.6144>)",
"saveto=Message", ENDITEM, LAST );
lr_log_message("Message = %s", lr_eval_string("<Message>"));

