Chilkat
HOME
Android™
ASP
Visual Basic
VB.NET
C#
iOS (IPhone)
Objective-C
C++
C
MFC
Delphi
FoxPro
Java
Perl
PHP Extension
PHP ActiveX
Python
PowerShell
Ruby
SQL Server
VBScript
message/rfc822 Attached EmailDownload: Chilkat .NET Assemblies C# example demonstrating how to access message/rfc822 attached messages within an email. // Attached messages are complete emails embedded within another email. // The Chilkat mail component provides methods and properties for // accessing attached messages. This example demonstrates how to // retrieve each attached email message and save each to a file. private void save_attached_messages(Chilkat.Email email) { Chilkat.Email attachedEmail; string filename; int fnameIdx = 0; // Loop over each attached message contained within the email. int n = email.NumAttachedMessages; int i; for (i = 0; i < n; i++) { attachedEmail = email.GetAttachedMessage(i); // Get the filename for this attached message // (This may or may not be present, or you may decide not to use // the embedded filename anyway...) filename = email.GetAttachedMessageFilename(i); if (filename.Length == 0) { fnameIdx = fnameIdx + 1; filename = "email_" + Convert.ToString(fnameIdx) + ".eml"; } // Save to a .eml file. attachedEmail.SaveEml(filename); // NOTE 1: Each attached message may itself contain other attached messages... // NOTE 2: File attachments within an attached message are not included in the // attachments for the outer email. } } Important: The download for this
example does not contain the ChilkatDotNet.dll which |
© 2000-2012 Chilkat Software, Inc. All Rights Reserved.