Example: smtp_logon_exSimple Mail Transfer Vuser Functions (SMTP)

Logs on to an SMTP server for a specific session.

int smtp_logon_ex( SMTP *ppsmtp, char *transaction, char *url, [ char *CommonName, char *LogonUser, char *LogonPass, char* LocalAddr, char* STARTTLS,] LAST );
ppsmtpA session identifier.
transactionA transaction name for this step in quotes. To instruct VuGen not to create a transaction for this step, use an empty string, "".
urlThe URL of the SMTP server, in the SMTP format style:
CommonNameOptional: A name for the login session in the following format: "CommonName=Smtp Test User 0001"
LogonUserOptional: the user name for SMTP authentication. Use the following format: "LogonUser=XXXX"
LogonPassOptional: the user password for SMTP authentication. Use the following format: "LogonPass=XXXX"
LocalAddrOptional: Sets the preferred IP address of the client <ip_addr>[:<port>]. This option is useful for IP spoofing. Use the following format:
STARTTLSOptional: Indicates that SMTP's StartTLS (Start Transport Layer Security) extension must be activated on the session. If the parameter is set, then the SMTP protocol's 'STARTTLS' command will be issued on the session during logon and connection will be switched to TLS mode. Use the following format :
LASTA marker indicating the end of the argument list.

The smtp_logon_ex function logs on to an SMTP server for a specific session.

This function is for use with multiple sessions. For global sessions, use the smtp_logon function, which leaves out the session identifier.

smtp_logon_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.