Chilkat HOME Android™ ASP Visual Basic VB.NET C# iOS (IPhone) Objective-C C++ C Unicode C++ Unicode C MFC Delphi DLL Delphi ActiveX FoxPro Java Perl PHP Extension PHP ActiveX Python PowerShell Ruby SQL Server VBScript
|
Access Attached Message (Embedded Email)How to access an email embedded within another email (i.e. an attached message). Download: Chilkat Cocoa Objective-C Libraries NSMutableString *strOutput = [NSMutableString stringWithCapacity:1000]; CkoEmail *email = [[[CkoEmail alloc] init] autorelease]; // Load an email from a .eml BOOL success; success = [email LoadEml: @"embeddedEmail.eml"]; if (success != YES) { [strOutput appendString: email.LastErrorText]; [strOutput appendString: @"\n"]; self.mainTextField.stringValue = strOutput; return; } // Display how many attached emails are embedded within // this one: int numAttached; numAttached = [email.NumAttachedMessages intValue]; [strOutput appendString:[NSString stringWithFormat: @"numAttached = %d\n" ,numAttached]]; // Get the 1st attached message. CkoEmail *email2; email2 = [email GetAttachedMessage: [NSNumber numberWithInt: 0]]; if (!(email2 == nil )) { // Display the subject, From, and a header field... [strOutput appendString: email2.Subject]; [strOutput appendString: @"\n"]; [strOutput appendString: email2.From]; [strOutput appendString: @"\n"]; [strOutput appendString: [email2 GetHeaderField: @"X-SOMETHING"]]; [strOutput appendString: @"\n"]; } self.mainTextField.stringValue = strOutput; |
© 2000-2013 Chilkat Software, Inc. All Rights Reserved.