Visual C++ Examples

ChilkatHOMEAndroid™ASPVisual BasicVB.NETC#iOS (IPhone)Objective-CC++CMFCDelphiFoxProJavaPerl
PHP ExtensionPHP ActiveXPythonPowerShellRubySQL ServerVBScript

C++ Examples

CkString
Byte Array
Bounced Mail
Bz2
Character Encoding
CSV
DH Key Exchange
DKIM/DomainKeys
Digital Certificates
Digital Signatures
DSA
Email
Email Object
Encryption
FTP
HTML Conversion
HTTP
IMAP
MHT / HTML Email
POP3
RSA
S/MIME
SMTP
Socket
Spider
SSH Key
SSH
SSH Tunnel
SFTP
Tar
Upload
XML
XMP
Zip Compression


More Examples...
Amazon S3
NTLM
FileAccess
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
Bzip2
LZW

 

 

 

 

 

 

 

 

IMAP Mailbox Hierarchy Separator Character

Downloads:

MS Windows Visual C/C++ Libraries
Linux/CentOS C/C++ Libraries
MAC OS X C/C++ Libraries
Solaris C/C++ Libraries
C++ Builder Libraries
FreeBSD C++ Libraries
HP-UX C++ Libraries
BlackBerry QNX C++ Libraries

C++ example code to list IMAP mailboxes and determine the mailbox hierarchy separator character.

// List mailboxes and determine the separator character used for
// the mailbox hierarchy.
void TestImapListMailboxes(void)
    {
    CkImap imap;
    
    // Any string passed to UnlockComponent automatically begins the 30-day trial.
    if (!imap.UnlockComponent("30-day trial"))
	{
	imap.SaveLastError("errorLog.xml");
	return;
	}

    // Connect to the IMAP server.
    if (!imap.Connect("mail.chilkatsoft.com"))
	{
	printf("Failed to connect to IMAP server\n");
	imap.SaveLastError("errorLog.xml");
	return;
	}

    // Login to the IMAP server.
    if (!imap.Login("matt@chilkatsoft.com","***"))
	{
	printf("Failed to login to IMAP server\n");
	imap.SaveLastError("errorLog.xml");
	return;
	}

    // The mailbox separator character will become known
    // after listing the mailboxes.
    CkMailboxes *mboxes = imap.ListMailboxes("","*");
    if (!mboxes)
	{
	printf("Failed to login to list mailboxes\n");
	imap.SaveLastError("errorLog.xml");
	return;
	}

    // Print the last response received from the IMAP server.
    CkString strLastResponse;
    imap.LastResponse(strLastResponse);
    printf("Raw IMAP response received from List mailboxes command:\n");
    printf("%s\n",strLastResponse.getAnsi());

    // Print the mailbox names.
    CkString strName;
    int i;
    int n = mboxes->get_Count();
    for (i=0; i<n; i++)
	{
	mboxes->GetName(i,strName);
	printf("%s\n",strName.getString());
	}

    delete mboxes;

    // Print the mailbox separator character.
    printf("Separator: %c\n",imap.get_SeparatorChar());

    return;
    }

 

 

 

© 2000-2010 Chilkat Software, Inc. All Rights Reserved.

Mail Component · .NET Mail Component · XML Parser