Sample code for 30+ languages & platforms
Classic ASP

Transition from Imap.FetchSequenceAsMime to Imap.FetchSingleBd

Provides instructions for replacing deprecated FetchSequenceAsMime method calls with FetchSingleBd.

Chilkat Classic ASP Downloads

Classic ASP
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%
success = 0

set imap = Server.CreateObject("Chilkat.Imap")

' ...
' ...

startSeqNum = 1
count = 5

' ------------------------------------------------------------------------
' The FetchSequenceAsMime method is deprecated:

' sa is a Chilkat.StringArray
Set sa = imap.FetchSequenceAsMime(startSeqNum,count)
If (imap.LastMethodSuccess = 0) Then
    Response.Write "<pre>" & Server.HTMLEncode( imap.LastErrorText) & "</pre>"
    Response.End
End If

' ...
' ...

' ------------------------------------------------------------------------
' Do the equivalent using FetchSingleBd.

imap.AutoDownloadAttachments = 1

success = 0
set bdMime = Server.CreateObject("Chilkat.BinData")
bUid = 0
i = 0
Do While i < count
    success = imap.FetchSingleBd(startSeqNum + i,bUid,bdMime)
    ' ...
    ' ...

    i = i + 1
Loop

%>
</body>
</html>