tfPop3SetSessionOption

Jump to: navigation, search

Table of Contents >> Optional Protocols >> POP3


#include <trsocket.h>


int tfPop3SetSessionOption (
ttPop3ClientHandle pop3Handle,
int optionName,
int optionValue
);


Function Description

This function is used to set POP3 client session options.


Parameters

  • pop3Handle
    The POP3 session handle.
  • optionName
    The name of the option to set (see below).
  • optionValue
    The value of the option to set (see below).


Returns

  • TM_ENOERROR
    Success
  • TM_EOPNOTSUPP
    APOP is not supported.
  • TM_EACCESS
    The POP3 session is currently connecting; setting options is not allowed.
  • TM_EINVAL
    One of the parameters is invalid.


POP3 Session Options

Option Name Option Value
TM_POP3_OPTNAME_BLOCKINGMODE TM_BLOCKING_ON or TM_BLOCKING_OFF.
TM_POP3_OPTNAME_APOP 1: Use APOP

0: Do not use APOP

Currently we do not support APOP.

TM_POP3_OPTNAME_LOGINLENGTH Total length of the username and password, including the null terminator.

This value can only be set when the session is disconnected.

TM_POP3_OPTNAME_TIMEOUT Change the timeout value.
TM_POP3_OPTNAME_CACHEMESSAGE The number of messages to cache the size for.
TM_POP3_OPTNAME_CACHE_UIDS When set to 1, this option causes the POP3 client to request a list of UIDs during the connection process. These UIDs are cached for later use.

Default 0.

TM_POP3_OPTNAME_UID_CACHESIZE This option defines the maximum number of UIDs to cache.


Table of Contents >> Optional Protocols >> POP3