(Classic ASP) Load MIME Object from Email Object
Demonstrates how to load a Chilkat Mime object from a Chilkat Email object. (Copies the email into a Mime object.)
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%
' For versions of Chilkat < 10.0.0, use CreateObject("Chilkat_9_5_0.Email")
set email = Server.CreateObject("Chilkat.Email")
success = email.LoadEml("qa_data/eml/sample.eml")
' Write the full MIME of the email to a StringBuilder.
' For versions of Chilkat < 10.0.0, use CreateObject("Chilkat_9_5_0.StringBuilder")
set sbMime = Server.CreateObject("Chilkat.StringBuilder")
success = email.GetMimeSb(sbMime)
' Load the MIME object from the StringBuilder
' For versions of Chilkat < 10.0.0, use CreateObject("Chilkat_9_5_0.Mime")
set mime = Server.CreateObject("Chilkat.Mime")
success = mime.LoadMimeSb(sbMime)
Response.Write "<pre>" & Server.HTMLEncode( mime.GetMime()) & "</pre>"
%>
</body>
</html>
|