imap_logon_ex
Example: imap_logon_ex | Internet Messaging Functions (IMAP) |
Logs on to an IMAP server for a specific session.
int imap_logon_ex( IMAP *ppimap,char *transaction, char *url, [char *certificate, char *key, char *password, char* LocalAddr, char* STARTTLS,]LAST );
ppimap | A session identifier. |
transaction | A transaction name for this step in quotes. To avoid creating a transaction for this step, use a null string, "". |
url |
The URL of the IMAP server in one of the following formats:
"URL=imap://johnd:letmein@exchange.mycompany.com"
|
certificate |
The SSL certificate file of the IMAP server:
" SSLCertificate=certfile.pem" |
key |
The SSL private key of the IMAP server:
" SSLCertificate=keyfile.pem" |
password |
An SSL password required for the IMAP server:
" SSLPassword=password", |
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 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 imap_logon_ex function logs on to a MS Exchange server for a specific session. It performs a logon using Simple IMAP, the MS Exchange protocol.
Note that the IMAP handle must be either initialized to zero(0), or point to another valid IMAP handle. If you point to an existing IMAP handle whose session is open, imap_logon_ex automatically logs out the user associated with the handle and connects the new user.
This function is for use with multiple sessions. For global sessions, use the imap_logon function, which leaves out the 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.