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

 

 

 

 

 

 

 

 

Access Attached Message (Embedded Email)

How to access an email embedded within another email (i.e. an attached message).

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
#include <CkEmail.h>

void ChilkatSample(void)
    {
    CkEmail email;

    //  Load an email from a .eml
    bool success;
    success = email.LoadEml("embeddedEmail.eml");
    if (success != true) {
        printf("%s\n",email.lastErrorText());
        return;
    }

    //  Display how many attached emails are embedded within
    //  this one:
    long numAttached;
    numAttached = email.get_NumAttachedMessages();
    printf("%d\n",numAttached);

    //  Get the 1st attached message.
    CkEmail *email2 = 0;
    email2 = email.GetAttachedMessage(0);
    if (!(email2 == 0 )) {

        //  Display the subject, From, and a header field...
        printf("%s\n",email2->subject());
        printf("%s\n",email2->ck_from());
        printf("%s\n",email2->getHeaderField("X-SOMETHING"));
    }

    }

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

Mail Component · .NET Mail Component · XML Parser