tfSmtpUserSetPointer

Jump to: navigation, search

Table of Contents >> Optional Protocols >> SMTP


#include <trsocket.h>


int tfSmtpUserSetPointer (
ttSmtpClientHandle smtpClientHandle,
void TM_FAR * userPtr
);


Function Description

This function allows you to associate a data pointer with an SMTP session. This can be useful for maintaining your own session state information if you have concurrent SMTP sessions. The complimentary function, tfSmtpUserGetPointer(), can be called from your event callback function to retrieve the data pointer.

This function can safely be called from an asynchronous SMTP event callback function.


Parameters

  • smtpClientHandle
    The SMTP client session handle as returned by tfSmtpUserNewSession().
  • userPtr
    A pointer to data that you want to associate with the SMTP session.


Returns

  • TM_ENOERROR
    Success.
  • TM_EINVAL
    Invalid SMTP client session handle.


Table of Contents >> Optional Protocols >> SMTP