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
Forwarded Emails may be EmbeddedThis is not a complete Delphi example -- it is only a fragment of Delphi code. The purpose is to make you aware that forwarded emails may have been constructed in such a way that the original email is present in an embedded email (i.e. as an rfc822/message sub-part in the MIME). You can use the NumAttachedMessages property to determine if any embedded (i.e. attached) emails are present. If so, each can be accessed by calling GetAttachedMessage(index). After you have the embedded email as an email object, you may do anything you desire with it -- such as saving all attachments to a subdirectory. // Does this email have any embedded emails?
// If an email is forwarded, the original email may be present
// as an embedded email.
if (email.NumAttachedMessages > 0) then begin
email2 := email.GetAttachedMessage(0);
// Save the attachments to a directory:
email2.SaveAllAttachments('myAttachmentsDir');
end;
|
© 2000-2010 Chilkat Software, Inc. All Rights Reserved.