Simple Mail Transfer Vuser Functions (SMTP) > Alphabetical List of Functions > smtp_logon_ex

smtp_logon_ex

Example: smtp_logon_ex Simple 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 );
ppsmtp A session identifier.
transaction A transaction name for this step in quotes. To instruct VuGen not to create a transaction for this step, use an empty string, "".
url The URL of the SMTP server, in the SMTP format style:
"URL=smtp://user0001t@techno.merc–int.com"
"URL=smtps://user0001t@techno.merc–int.com:8181"
CommonName Optional: A name for the login session in the following format: "CommonName=Smtp Test User 0001"
LogonUser Optional: the user name for SMTP authentication. Use the following format: "LogonUser=XXXX"
LogonPass Optional: the user password for SMTP authentication. Use the following format: "LogonPass=XXXX"
LocalAddr Optional: Sets the preferred IP address of the client <ip_addr>[:<port>]. This option is useful for IP spoofing. Use the following format:
"LocalAddr=199.123.123.123"
STARTTLS Optional: 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 :
"STARTTLS"
LAST A 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.

Parameterization

All arguments of this function of the type char, can be parameterized with standard parameterization.