Chilkat HOME ASP Visual Basic VB.NET C# Visual C++ C MFC Delphi FoxPro Java Perl PHP Python Ruby SQL Server VBScript
|
Access Attached Message (Embedded Email)How to access an email embedded within another email (i.e. an attached message).
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </head> <body> <% set email = Server.CreateObject("Chilkat.Email2") ' Load an email from a .eml success = email.LoadEml("embeddedEmail.eml") If (success <> 1) Then Response.Write email.LastErrorText & "<br>" End If ' Display how many attached emails are embedded within ' this one: numAttached = email.NumAttachedMessages Response.Write numAttached & "<br>" ' Get the 1st attached message. Set email2 = email.GetAttachedMessage(0) If (Not (email2 Is Nothing )) Then ' Display the subject, From, and a header field... Response.Write email2.Subject & "<br>" Response.Write email2.From & "<br>" Response.Write email2.GetHeaderField("X-SOMETHING") & "<br>" End If %> </body> </html> |
Need a specific example? Send a request to support@chilkatsoft.com
© 2000-2008 Chilkat Software, Inc. All Rights Reserved.