tfSmtpUserReset

Jump to: navigation, search

Table of Contents >> Optional Protocols >> SMTP


#include <trsocket.h>


int tfSmtpUserReset (ttSmtpClientHandle smtpClientHandle);


Function Description

If the user wishes to abort the action, they can call this function to send a RSET command to the server, kill the command timer, and set the state to the initial value. The session is still connected after this command.

In non-blocking mode, a successful reply from the server will generate a TM_SMTP_EVENT_RESET event to your SMTP event callback function.


Parameters


Returns

  • TM_ENOERROR
    Success.
  • TM_EINVAL
    Invalid SMTP client session handle.
  • TM_EPERM
    The SMTP session is not connected.
  • TM_EINPROGRESS
    The operation is in progress (non-blocking mode only). Call tfSmtpUserExecute() periodically until complete.
  • TM_ESERVERPERM
    The server rejected the command with a permanent negative completion reply (5xx status code, see RFC 5321).
  • TM_ESERVERTEMP
    The server rejected the command with a transient negative completion reply (4xx status code, see RFC 5321).
  • TM_ESERVERSYNC
    The client and server are out of sync and cannot proceed; the session has been disconnected. This can occur, for example, if the server unexpectedly sends an intermediate reply (3xx status code, see RFC 5321) to a command that requires a completion code.
  • TM_ETIMEDOUT
    The Treck SMTP client timed out and disconnected while waiting for a reply from the server. The time limit is set via tfSmtpUserNewSession().
  • TM_ESHUTDOWN
    The server closed the connection, unexpectedly.
  • other errors
    Some socket errors returned from the SMTP client's calls to send() and recv() are passed directly to the caller.


Table of Contents >> Optional Protocols >> SMTP