Home Site Map Buy Email
AdvSMTP
AdvIMAP4
AdvPOP3
AdvFile
AdvZIP
AdvGraphGenerator
AdvLDAP
AdvHTTP
AdvDSN
AdvDirectory
AdvRegistry
AdvMX
ASP Components >> AdvIMAP4
Download | Buy
AdvIMAP4

If you are looking for an easy to use and reliable IMAP4 component -- you have found the source!

Advanced Webmail is an ASP.NET based full featured webmail solution designed on the IMAP4 email protocol using AdvIMAP4 component. This will enable your to send, retrieve, merge, compose, view, edit, store and print Internet email messages. Major functions of AdvIMAP4 component are ...

Complete server side mailbox management, such as Create, Delete, Rename, Subscribe, Unsubscribe, Check, Close, Examine, Select, List, Lsub and Status.
Retrieve mail messages from any mailbox using message sequence numbers and UIDs and also can sort the messages in given ascending and descending criteria.
It provides an advanced search mechanism, which can search any mailbox for messages on given search criteria.
Mail messages can be copied from one mailbox to any other mailbox using their sequence numbers or UIDs.
Messages status can be changed manually.
It also provides Download and DownloadAs operations. Download operation allows downloading a file to client browser with actual file name and DownloadAs operation allows downloading a file to client browser with specified name. These operations can be used to download attachments to client machine.

Click Here here for live demo.

Example (ASP):

<% set Obj = Server.CreateObject("AdvIMAP4.IMAP4") %>

Example (ColdFusion):

<CFOBJECT Class="AdvIMAP4.IMAP4" Action="Create" Name="Obj">

AdvIMAP4 Properties

Property Description
Attachment Required for methods Append (optional) and RFC822 (optional). It is semicolon ";" separated list of attachments to be append with mail message as its attachments.

Example (ASP):
<% Obj.Attachment = "c:\myfolder\myfile.exe" %>

Example (ColdFusion):
<CFSET Obj.Attachment = "c:\myfolder\myfile.exe">
AttachmentPath The physical path where attachments will be saved.

Example (ASP):
<% Obj.AttachmentPath = "c:\myfolder\attachments" %>

Example (ColdFusion):
<CFSET Obj.AttachmentPath = "c:\myfolder\attachments">
AttachmentPathError Returns 1 if any error occurred for AttachmentPath otherwise 0.

Example (ASP):
<% if Obj.AttachmentPathError = 1 then
        Response.Write Obj.AttachmentPathErrorReason
end if %>

Example (ColdFusion):
<CFIF #Obj.AttachmentPathError# EQ 1>
        <CFOUTPUT>#Obj.AttachmentPathErrorReason#</CFOUTPUT>
</CFIF>
AttachmentPathErrorReason Reports any error that occurred for AttachmentPath.

Example (ASP):
<% if Obj.AttachmentPathError = 1 then
        Response.Write Obj.AttachmentPathErrorReason
end if %>

Example (ColdFusion):
<CFIF #Obj.AttachmentPathError# EQ 1>
        <CFOUTPUT>#Obj.AttachmentPathErrorReason#</CFOUTPUT>
</CFIF>
AttachmentPathHTTP URL for the AttachmentPath where attachments are saved.

Example (ASP):
<% Obj.AttachmentPathHTTP = "http://advancedwebmail.com/attachments" %>

Example (ColdFusion):
<CFSET Obj.AttachmentPathHTTP = "http://advancedwebmail.com/attachments">
Body Required for methods Append (optional) and RFC822 (optional). It is body of the message to be append with mail message as its body.

Example (ASP):
<% Obj.Body = "this is append message" %>

Example (ColdFusion):
<CFSET Obj.Body = "this is append message">
CC Required for methods Append (optional) and RFC822 (optional). It is cc address of message to be append with mail message, it can be single cc address or semicolon ";" separated list of addresses.

Example (ASP):
<% Obj.CC = "support@aspfusion.net" %>

Example (ColdFusion):
<CFSET Obj.CC = "support@aspfusion.net">
CharsPerLine Required for methods Append (optional) and RFC822 (optional). It is characters per line of the mail message, if it is not specified then default 76 characters per line is used. Minimum characters per line allowed are 60.

Example (ASP):
<% Obj.CharsPerLine = 70 %>

Example (ColdFusion):
<CFSET Obj.CharsPerLine = 70>
CustomHeader Required for methods Append (optional) and RFC822 (optional). It can be used for message identification. It may be the name of the company, ip etc. You can assign it as CustomHeaderName:HeaderValue e.g. X-Mail-IP:192.168.0.1 to set custom header. If there are multiple custom headers then all custom headers will be semicolon ";" separated.

Example (ASP):
<% Obj.CustomHeader = "X-Mail-IP:192.168.0.1" %>

Example (ColdFusion):
<CFSET Obj.CustomHeader = "X-Mail-IP:192.168.0.1">
DataItems Required for methods Status, Fetch, Search (optional), Store, UIDFetch, UIDSearch (optional) and UIDStore. Methods for which this property is used are

Status this property is used to retrieve data items from specified mailbox. Valid values are

MESSAGES to retrieve number of messages in the mailbox
RECENT to retrieve number of messages with the \RECENT flag set
UIDNEXT to retrieve next UID value that will be assigned to a new message in the mailbox
UIDVALIDITY to retrieve unique identifier validity value of the mailbox
UNSEEN to retrieve number of messages which do not have the \SEEN flag set

You can also give combination of all these, separated with space.

Example (ASP):
<% Obj.DataItems = "messages unseen" %>

Example (ColdFusion):
<CFSET Obj.DataItems = "messages unseen">

Fetch and UIDFetch it is used to set fetch criteria. Valid values for fetch criteria are

GETHEADER to retrieve mail headers only
GETALL to retrieve complete mail along with headers and body

Example (ASP):
<% Obj.DataItems = "getheader" %>

Example (ColdFusion):
<CFSET Obj.DataItems = "getheader">

Search and UIDSearch it is used to set data to be searched. e.g "subject hello", then search will return sequence number of those messages, which contains word "hello" in their subjects. If not specified then all messages are selected as a result.

Example (ASP):
<% Obj.DataItems = "subject hello" %>

Example (ColdFusion):
<CFSET Obj.DataItems = "subject hello">

Store and UIDStore it is used to update data items. Valid values are

FLAGS it replace the flags for the message
FLAGS.SILENT equivalent to FLAGS, but without returning a new value
+FLAGS add the argument to the flags for the message
+FLAGS.SILENT equivalent to +FLAGS, but without returning a new value
-FLAGS it remove the argument from the flags for the message
-FLAGS.SILENT equivalent to -FLAGS, but without returning a new value

Simple flags and flags.silent remove all previous values of flags and set new values of flags for the mail. If + sign is used then previous values of flags are not removed and also new values are placed. - sign is used for performing not of + operation.

Example (ASP):
<% Obj.DataItems = "+flags.silent" %>

Example (ColdFusion):
<CFSET Obj.DataItems = "+flags.silent">
DataItemValues Required for Store and UIDStore. Used to set updated values for dataitems e.g. \seen, \deleted, \flagged. One can also give combination of all these separated with space.

Example (ASP):
<% Obj.DataItemValues = "\seen \flagged" %>

Example (ColdFusion):
<CFSET Obj.DataItemValues = "\seen \flagged">
DeleteFile This property is used to set flag whether to delete the file from server after downloading through Download or DownloadAs methods. Valid values are

TRUE if this flag is set as TRUE then component will delete the file from server after downloading
FALSE (default) if this flag is set as FALSE then component will not delete the file from server after downloading

Example (ASP):
<% Obj.DeleteFile = true %>

NOTE: Can only be used for ASP
DownloadForceFully This property is used to inform AdvFile component whether to download file forcefully through Download or DownloadAs methods. Valid values are

TRUE if this flag is set as TRUE then component will download file forcefully
FALSE (default) if this flag is set as FALSE then component will not download file forcefully, browser will decide whether to display or download the file

Example (ASP):
<% Obj.DownloadForceFully = true %>

NOTE: Can only be used for ASP.
ErrorReason Reports any error that occurred during the request.

Example (ASP):
<% if Obj.IsError = 1 then
        Response.Write Obj.ErrorReason
else
        No Error Occurred
end if %>

Example (ColdFusion):
<CFIF #Obj.IsError# EQ 1>
        <CFOUTPUT>#Obj.ErrorReason#</CFOUTPUT>
<CFELSE>
        <CFOUTPUT>No Error Occurred</CFOUTPUT>
</CFIF>
FlagsLists Required for method Append (optional). Flags that are required to be set for message e.g. \seen, \draft, \answered, \flagged and \deleted. You can also give combination of all these separated with space. If not specified then no flag is set.

Example (ASP):
<% Obj.FlagsLists = "\seen \flagged" %>

Example (ColdFusion):
<CFSET Obj.FlagsLists = "\seen \flagged">
From Required for method Append (optional) and RFC822 (optional). It is from address of message to be append with mail message.

Example (ASP):
<% Obj.From = "from@aspfusion.net" %>

Example (ColdFusion):
<CFSET Obj.From = "from@aspfusion.net">
IsError Returns 1 if any error occurred during the request otherwise 0.

Example (ASP):
<% if Obj.IsError = 1 then
        Response.Write Obj.ErrorReason
else
        No Error Occurred
end if %>

Example (ColdFusion):
<CFIF #Obj.IsError# EQ 1>
        <CFOUTPUT>#Obj.ErrorReason#</CFOUTPUT>
<CFELSE>
        <CFOUTPUT>No Error Occurred</CFOUTPUT>
</CFIF>
MailBoxName Required for methods Append, Create, Delete, Examine, Rename, Select, Status, Subscribe, UnSubscribe, Check, Close, Copy, Fetch (optional, default is Inbox), Search, Store, UIDCopy, UIDFetch (optional, default is Inbox), UIDSearch, UIDStore for performing the corresponding action.

Example (ASP):
<% Obj.MailBoxName = "myfolder" %>

Example (ColdFusion):
<CFSET Obj.MailBoxName = "myfolder">
MessageLiteral Required for method Append. Message in RFC822 format, required to be append in specified mailbox.

Example (ASP):
<% Obj.MessageLiteral = RFC822FormatMessage %>

Example (ColdFusion):
<CFSET Obj.MessageLiteral = RFC822FormatMessage>
MessageNumberOrUID Required for Copy, Fetch(optional, default is all message numbers), Store, UIDCopy, UIDFetch(optional, default is all message UIDs), UIDStore. Message sequence numbers or UIDs of messages, for performing action. We can also write it as 3:8 means messages with sequence number starts from 3 and ends at 8. Also 3,8 (comma separated list) can be given which means messages with sequence number 3 and 8 only.

Example (ASP):
<% Obj.MessageNumberOrUID = "2,5,8,12,17" %>

Example (ColdFusion):
<CFSET Obj.MessageNumberOrUID = "2,5,8,12,17">
MessageType Required for methods Append (optional) and RFC822 (optional). It is type of message. Valid values are

HTML (default)
TEXT

Example (ASP):
<% Obj.MessageType = "text" %>

Example (ColdFusion):
<CFSET Obj.MessageType = "text">
NewMailBoxName Required for methods Rename and Copy.

Example (ASP):
<% Obj.NewMailBoxName = "yourfolder" %>

Example (ColdFusion):
<CFSET Obj.NewMailBoxName = "yourfolder">
OrderBy Required for Fetch (optional), UIDFetch (optional) for sorting of mails. If not specified then no sorting is performed and mail messages are returned in order as returned by IMAP4 server. Valid sorting criteria are

Subject_ASC
Subject_DESC
From_ASC
From_DESC
To_ASC
To_DESC
Date_ASC
Date_DESC
Size_ASC
Size_DESC
Attachment_ASC (without attachment mails first)
Attachment_DESC (with attachment mails first)

Example (ASP):
<% Obj.OrderBy = "size_desc" %>

Example (ColdFusion):
<CFSET Obj.OrderBy = "size_desc">
Password IMAP4 account password, required for authentication.

Example (ASP):
<% Obj.Password = "mypassword" %>

Example (ColdFusion):
<CFSET Obj.Password = "mypassword">
Port This property is used to specify IMAP4 server port. If not specefied then default port 143 is used.

Example (ASP):
<% Obj.Port = 8143 %>

Example (ColdFusion):
<CFSET Obj.Port = 8143>
ReferenceName Required for List (optional), Lsub (optional). Name of a mailbox or level of mailbox hierarchy. If not specified then empty reference name is selected.

Example (ASP):
<% Obj.ReferenceName = "myfolder" %>

Example (ColdFusion):
<CFSET Obj.ReferenceName = "myfolder">
ServerName This property is used to specify IMAP4 server name or IP address.

Example (ASP):
<% Obj.ServerName = "aspfusion.net" %>

Example (ColdFusion):
<CFSET Obj.ServerName = "aspfusion.net">
SortFirst Required for Fetch (optional) for sorting mail messages first and then return required mail messages. This parameter is only valid for GetHeaderOnly and ignored in case of GetAll. If parameter MessageNumber contains 1:5 and this parameter is set as TRUE, the component will fetch all messages first and will sort on given sorting criteria and will return mail messages that come in sequence from 1 to 5, and if this parameter is set as FALSE, the component will fetch messages from 1 to 5 and will sort on given sorting criteria and will return mail messages. Valid values are

TRUE if this value is set as TRUE then component will fetch all messages, perform sorting and then will return required messages
FALSE (default) if this value is set as TRUE then component will fetch required mesages, perform sorting and then will return those messages

Example (ASP):
<% Obj.SortFirst = true %>

Example (ColdFusion):
<CFSET Obj.SortFirst = true>
Subject Required for methods Append (optional) and RFC822 (optional). It is subject of message to be append with mail message.

Example (ASP):
<% Obj.Subject = "testing mail" %>

Example (ColdFusion):
<CFSET Obj.Subject = "testing mail">
Timeout This property is used to set request timeout value. If not specified then default timeout value 60 is used.

Example (ASP):
<% Obj.Timeout = 120 %>

Example (ColdFusion):
<CFSET Obj.Timeout = 120>
To Required for methods Append (optional) and RFC822 (optional). It is to address of message to be append with mail message, it can be single to address or semicolon ";" separated list of addresses.

Example (ASP):
<% Obj.To = "help@aspfusion.net" %>

Example (ColdFusion):
<CFSET Obj.To = "help@aspfusion.net">
Type This property is used to set content type for the file to be downloaded through Download or DownloadAs methods. Default value is "application/octet-stream".

Example (ASP):
<% Obj.Type = "application/zip" %>

NOTE: Can only be used for ASP.
UserName IMAP4 account user name, required for authentication.

Example (ASP):
<% Obj.UserName = "myusername" %>

Example (ColdFusion):
<CFSET Obj.UserName = "myusername">
WildCard Required for methods List (optional), Lsub (optional). Mailbox name with possible wildcards. If not specified then empty name is selected. The character " * " is a wildcard, and matches zero or more characters at this position. The character " % " is similar to " * " but it does not match a hierarchy delimiter.

Example (ASP):
<% Obj.WildCard = " * " %>

Example (ColdFusion):
<CFSET Obj.WildCard = " * ">

AdvIMAP4 Methods

Method Parameter Return Value Description
Append None None Appends a message to the specified mailbox.

Example (ASP):
<% Obj.Append() %>

Example (ColdFusion):
<CFSET Obj.Append()>
Capability None Object Requests a listing of capabilities that the IMAP4 server supports.

Example (ASP):
<% set Result = Obj.Capability()
        Response.Write Result.Capability
set Result = nothing %>

Example (ColdFusion):
<CFSET Result = Obj.Capability()>
<CFOUTPUT>#Result.Capability#</CFOUTPUT>

WHERE in Capability object
Capability contains capabilities that the IMAP4 server supports.

Check None None Requests a checkpoint to the specified mailbox.

Example (ASP):
<% Obj.Check() %>

Example (ColdFusion):
<CFSET Obj.Check()>
Close None None Closes the mailbox and remove all messages that are flagged for deletion.

Example (ASP):
<% Obj.Close() %>

Example (ColdFusion):
<CFSET Obj.Close()>
Copy None None Copies the specified message(s) from one mailbox to the end of the destination mailbox.

Example (ASP):
<% Obj.Copy() %>

Example (ColdFusion):
<CFSET Obj.Copy()>
Create None None Create a mailbox at server with the name specified.

Example (ASP):
<% Obj.Create() %>

Example (ColdFusion):
<CFSET Obj.Create()>
Delete None None Delete a mailbox from server with the name specified.

Example (ASP):
<% Obj.Delete() %>

Example (ColdFusion):
<CFSET Obj.Delete()>
DeleteMessages None Object Delete specified message(s) from the mailbox using their sequence numbers.

Example (ASP):
<% set Result = Obj.DeleteMessages()
        Response.Write Result.MessageNumber
set Result = nothing %>

Example (ColdFusion):
<CFSET Result = Obj.DeleteMessages()>
<CFOUTPUT>#Result.MessageNumber#</CFOUTPUT>

WHERE in DeleteMessages object
MessageNumber contains tab-separated list of message sequence numbers of the messages that has been permanently removed from the mailbox.

Download 1. Source File None Download the given source file to client's browser.

Example (ASP):
<% Obj.Download("c:\myfolder\myfile.exe") %>

NOTE: Can only be used for ASP.
DownloadAs 1. Source File
2. New File Name
None Download the given source file with given name to client's browser.

Example (ASP):
<% Obj.Download("c:\myfolder\myfile.exe", "yourfile.exe") %>

NOTE: Can only be used for ASP.
Examine None Object Select a mailbox at server for read-only access.

Example (ASP):
<% set Result = Obj.Examine()
        Response.Write Result.Flags
        Response.Write Result.Exists
        Response.Write Result.Recent
        Response.Write Result.Unseen
        Response.Write Result.PermanentFlags
        Response.Write Result.UIDValidity
set Result = nothing %>

Example (ColdFusion):
<CFSET Result = Obj.Examine()>
<CFOUTPUT>
        #Result.Flags#
        #Result.Exists#
        #Result.Recent#
        #Result.Unseen#
        #Result.PermanentFlags#
        #Result.UIDValidity#
</CFOUTPUT>

WHERE in Examine object
Flags contains flags that are defined in the mailbox.
Exists contains number of messages in the mailbox.
Recent contains number of messages with the \Recent flag set.
Unseen contains message sequence number of the first unseen message in the mailbox.
PermanentFlags contains flags that the client can change permanently.
UIDValidity contains unique identifier validity value.

Expunge None Object Remove all messages that are flagged for deletion.

Example (ASP):
<% set Result = Obj.Expunge()
        Response.Write Result.MessageNumber
set Result = nothing %>

Example (ColdFusion):
<CFSET Result = Obj.Expunge()>
<CFOUTPUT>#Result.MessageNumber#</CFOUTPUT>

WHERE in Expunge object
MessageNumber contains tab separated list of deleted message numbers.

Fetch None Array of objects Retrieve the data associated with message(s) using message sequence numbers.

Example (ASP):
<% set Result = Obj.Fetch()
for each Member in Result
        Response.Write Member.MessageNo
        Response.Write Member.Priority
        Response.Write Member.Date
        Response.Write Member.MessageID
        Response.Write Member.MIMEVersion
        Response.Write Member.ContentType
        Response.Write Member.From
        Response.Write Member.To
        Response.Write Member.ReplyTo
        Response.Write Member.Subject
        Response.Write Member.XMailer
        Response.Write Member.UID
        Response.Write Member.Status
        Response.Write Member.Size
        Response.Write Member.CC
        Response.Write Member.Body
        Response.Write Member.HTMLBody
        Response.Write Member.AttachmentSent
        Response.Write Member.AttachmentSaved
        Response.Write Member.AttachmentFiles
        set List = Member.ExtraHeaders()
        for each Mem in List
               Response.Write Mem.Name
               Response.Write Mem.Value
        next
        set List = nothing
next
set Result = nothing %>

Example (ColdFusion):
<CFSET Result = Obj.Fetch()>
<CFLOOP Collection="#Result#" Item="Member">
        <CFOUTPUT>
               #Member.MessageNo#
               #Member.Priority#
               #Member.Date#
               #Member.MessageID#
               #Member.MIMEVersion#
               #Member.ContentType#
               #Member.From#
               #Member.To#
               #Member.ReplyTo#
               #Member.Subject#
               #Member.XMailer#
               #Member.UID#
               #Member.Status#
               #Member.Size#
               #Member.CC#
               #Member.Body#
               #Member.HTMLBody#
               #Member.AttachmentSent#
               #Member.AttachmentSaved#
               #Member.AttachmentFiles#
               <CFSET List = Obj.ExtraHeaders()>
               <CFLOOP Collection="#List#" Item="Mem">
                      <CFOUTPUT>
                             #Mem.Name#
                             #Mem.Value#
                      </CFOUTPUT>
               </CFLOOP>
        </CFOUTPUT>
</CFLOOP>

WHERE in Fetch collection
MessageNo contains message sequence number of the message.
Priority contains priority number of the message.
Date contains mail date.
MessageID contains message id.
MIMEVersion contains valid version for the MIME.
ContentType contains content type, means what type of message it is.
From contains mail address of the sender of the mail.
To contains receiver address(s).
ReplyTo contains reply address.
Subject contains subject of the mail.
XMailer contains value for X-Mailer header.
UID contains UID for the mail.
Status contains value of the current status of the mail.
Size contains size of mail.
CC contains CC address(s).
Body contains body of the mail.
HTMLBody contains HTML body of the mail, if mail is sent in HTML format.
AttachmentSent contains a tab-separated list of all source attachment names.
AttachmentSaved contains a tab-separated list of all saved file names. In case a file name already exists at the destination path with the name sent from the POP3 server, AdvIMAP4 component will change it to a unique file name before saving it.
AttachmentFiles contains a tab-separated list of the actual filenames written to the server. This is the absolute path on the server's hard disc after making names unique if required.

WHERE in ExtraHeaders collection
Name contains name of the header.
Value contains value of the header.

List None Array of objects Requests a list of mailboxes at server.

Example (ASP):
<% set Result = Obj.List()
for each Member in Result
        Response.Write Member.NameAttributes
        Response.Write Member.HierarchyDelimiter
        Response.Write Member.Name
next
set Result = nothing %>

Example (ColdFusion):
<CFSET Result = Obj.List()>
<CFLOOP Collection="#Result#" Item="Member">
        <CFOUTPUT>
               #Member.NameAttributes#
               #Member.HierarchyDelimiter#
               #Member.Name#
        </CFOUTPUT>
</CFLOOP>

WHERE in List collection
NameAttributes contains name of attributes that are defined. Four name attributes are defined, \Noinferiors, \Noselect, \Marked and \Unmarked.
HierarchyDelimiter contains hierarchy delimiter, which is a character used to delimit levels of hierarchy in a mailbox name.
Name contains the name, which represents an unambiguous left-to-right hierarchy.
Lsub None Array of objects Requests a subset of user defined "active" or "subscribe" mailbox names.

Example (ASP):
<% set Result = Obj.Lsub()
for each Member in Result
        Response.Write Member.NameAttributes
        Response.Write Member.HierarchyDelimiter
        Response.Write Member.Name
next
set Result = nothing %>

Example (ColdFusion):
<CFSET Result = Obj.Lsub()>
<CFLOOP Collection="#Result#" Item="Member">
        <CFOUTPUT>
               #Member.NameAttributes#
               #Member.HierarchyDelimiter#
               #Member.Name#
        </CFOUTPUT>
</CFLOOP>

WHERE in Lsub collection
NameAttributes contains name of attributes that are defined. Four name attributes are defined, \Noinferiors, \Noselect, \Marked and \Unmarked.
HierarchyDelimiter contains hierarchy delimiter, which is a character used to delimit levels of hierarchy in a mailbox name.
Name contains the name, which represents an unambiguous left-to-right hierarchy.
Rename None None Rename a mailbox at server with the new name specified.

Example (ASP):
<% Obj.Rename() %>

Example (ColdFusion):
<CFSET Obj.Rename()>
RFC822 None Object Return RFC822 format message which can be further used in Append method for appending message.

Example (ASP):
<% set Result = Obj.RFC822()
        Response.Write Result.Message
set Result = nothing %>

Example (ColdFusion):
<CFSET Result = Obj.RFC822()>
<CFOUTPUT>#Result.Message#</CFOUTPUT>

WHERE in RFC822 object
Message contains RFC822 format message, then it can be used in Append method for appending message.

Search None Object Search the mailbox for messages that match the given search criteria and retrieve the corresponding message sequence numbers.

Example (ASP):
<% set Result = Obj.Search()
        Response.Write Result.MessageNumber
set Result = nothing %>

Example (ColdFusion):
<CFSET Result = Obj.Search()>
<CFOUTPUT>#Result.MessageNumber#</CFOUTPUT>

WHERE in Search object
MessageNumber contains tab separated list of searched message numbers.

Select None Object Select a mailbox at server for read and write access.

Example (ASP):
<% set Result = Obj.Select()
        Response.Write Result.Flags
        Response.Write Result.Exists
        Response.Write Result.Recent
        Response.Write Result.Unseen
        Response.Write Result.PermanentFlags
        Response.Write Result.UIDValidity
set Result = nothing %>

Example (ColdFusion):
<CFSET Result = Obj.Select()>
<CFOUTPUT>
        #Result.Flags#
        #Result.Exists#
        #Result.Recent#
        #Result.Unseen#
        #Result.PermanentFlags#
        #Result.UIDValidity#
</CFOUTPUT>

WHERE in Select object
Flags contains flags that are defined in the mailbox.
Exists contains number of messages in the mailbox.
Recent contains number of messages with the \Recent flag set.
Unseen contains message sequence number of the first unseen message in the mailbox.
PermanentFlags contains flags that the client can change permanently.
UIDValidity contains unique identifier validity value.

Status None Object Requests the status of a particular mailbox at server.

Example (ASP):
<% set Result = Obj.Status()
        Response.Write Result.Messages
        Response.Write Result.Unseen
        Response.Write Result.UIDNext
        Response.Write Result.UIDValidity
        Response.Write Result.Recent
set Result = nothing %>

Example (ColdFusion):
<CFSET Result = Obj.Status()>
<CFOUTPUT>
        #Result.Messages#
        #Result.Unseen#
        #Result.UIDNext#
        #Result.UIDValidity#
        #Result.Recent#
</CFOUTPUT>

WHERE in Status object
Messages contains number of messages in the mailbox.
Unseen contains the number of messages that do not have the \Seen flag set.
UIDNext contains next valid UID for incoming mail.
UIDValidity contains the UID of the mailbox.
Recent contains number of messages that have \Recent flag set.

Store None Array of objects Updates message data associated with message sequence numbers in a specified mailbox.

Example (ASP):
<% set Result = Obj.Store()
for each Member in Result
        Response.Write Member.MessageNumber
        Response.Write Member.Flags
next
set Result = nothing %>

Example (ColdFusion):
<CFSET Result = Obj.Store()>
<CFLOOP Collection="#Result#" Item="Member">
        <CFOUTPUT>
               #Member.MessageNumber#
               #Member.Flags#
        </CFOUTPUT>
</CFLOOP>

WHERE in Store collection
MessageNumber contains message sequence number of the message whose associated data is changed.
Flags contains the updated value of the changed data.

Subscribe None None Adds the specified mailbox name to the server's set of "active" or "subscribed" mailbox list.

Example (ASP):
<% Obj.Subscribe() %>

Example (ColdFusion):
<CFSET Obj.Subscribe()>
UIDCopy None None Copies the specified message(s) using their unique identifiers from one mailbox to the end of the destination mailbox.

Example (ASP):
<% Obj.UIDCopy() %>

Example (ColdFusion):
<CFSET Obj.UIDCopy()>
UIDDeleteMessages None Object Delete specified message(s) from the mailbox using their UIDs.

Example (ASP):
<% set Result = Obj.UIDDeleteMessages()
        Response.Write Result.MessageNumber
set Result = nothing %>

Example (ColdFusion):
<CFSET Result = Obj.UIDDeleteMessages()>
<CFOUTPUT>#Result.MessageNumber#</CFOUTPUT>

WHERE in UIDDeleteMessages object
MessageNumber contains tab-separated list of message sequence numbers of the messages that has been permanently removed from the mailbox.

UIDFetch None Array of objects Retrieve the data associated with message(s) using UIDs.

Example (ASP):
<% set Result = Obj.UIDFetch()
for each Member in Result
        Response.Write Member.MessageNo
        Response.Write Member.Priority
        Response.Write Member.Date
        Response.Write Member.MessageID
        Response.Write Member.MIMEVersion
        Response.Write Member.ContentType
        Response.Write Member.From
        Response.Write Member.To
        Response.Write Member.ReplyTo
        Response.Write Member.Subject
        Response.Write Member.XMailer
        Response.Write Member.UID
        Response.Write Member.Status
        Response.Write Member.Size
        Response.Write Member.CC
        Response.Write Member.Body
        Response.Write Member.HTMLBody
        Response.Write Member.AttachmentSent
        Response.Write Member.AttachmentSaved
        Response.Write Member.AttachmentFiles
        set List = Member.ExtraHeaders()
        for each Mem in List
               Response.Write Mem.Name
               Response.Write Mem.Value
        next
        set List = nothing
next
set Result = nothing %>

Example (ColdFusion):
<CFSET Result = Obj.UIDFetch()>
<CFLOOP Collection="#Result#" Item="Member">
        <CFOUTPUT>
               #Member.MessageNo#
               #Member.Priority#
               #Member.Date#
               #Member.MessageID#
               #Member.MIMEVersion#
               #Member.ContentType#
               #Member.From#
               #Member.To#
               #Member.ReplyTo#
               #Member.Subject#
               #Member.XMailer#
               #Member.UID#
               #Member.Status#
               #Member.Size#
               #Member.CC#
               #Member.Body#
               #Member.HTMLBody#
               #Member.AttachmentSent#
               #Member.AttachmentSaved#
               #Member.AttachmentFiles#
               <CFSET List = Obj.ExtraHeaders()>
               <CFLOOP Collection="#List#" Item="Mem">
                      <CFOUTPUT>
                             #Mem.Name#
                             #Mem.Value#
                      </CFOUTPUT>
               </CFLOOP>
        </CFOUTPUT>
</CFLOOP>

WHERE in UIDFetch collection
MessageNo contains message sequence number of the message.
Priority contains priority number of the message.
Date contains mail date.
MessageID contains message id.
MIMEVersion contains valid version for the MIME.
ContentType contains content type, means what type of message it is.
From contains mail address of the sender of the mail.
To contains receiver address(s).
ReplyTo contains reply address.
Subject contains subject of the mail.
XMailer contains value for X-Mailer header.
UID contains UID for the mail.
Status contains value of the current status of the mail.
Size contains size of mail.
CC contains CC address(s).
Body contains body of the mail.
HTMLBody contains HTML body of the mail, if mail is sent in HTML format.
AttachmentSent contains a tab-separated list of all source attachment names.
AttachmentSaved contains a tab-separated list of all saved file names. In case a file name already exists at the destination path with the name sent from the POP3 server, AdvIMAP4 component will change it to a unique file name before saving it.
AttachmentFiles contains a tab-separated list of the actual filenames written to the server. This is the absolute path on the server's hard disc after making names unique if required.

WHERE in ExtraHeaders collection
Name contains name of the header.
Value contains value of the header.

UIDSearch None Object Search the mailbox for messages that match the given search criteria and retrieve the corresponding UIDs.

Example (ASP):
<% set Result = Obj.UIDSearch()
        Response.Write Result.MessageNumber
set Result = nothing %>

Example (ColdFusion):
<CFSET Result = Obj.UIDSearch()>
<CFOUTPUT>#Result.MessageNumber#</CFOUTPUT>

WHERE in Search object
MessageNumber contains tab separated list of searched message numbers.

UIDStore None Array of objects Updates message data associated with UIDs in a specified mailbox.

Example (ASP):
<% set Result = Obj.UIDStore()
for each Member in Result
        Response.Write Member.MessageNumber
        Response.Write Member.Flags
next
set Result = nothing %>

Example (ColdFusion):
<CFSET Result = Obj.UIDStore()>
<CFLOOP Collection="#Result#" Item="Member">
        <CFOUTPUT>
               #Member.MessageNumber#
               #Member.Flags#
        </CFOUTPUT>
</CFLOOP>

WHERE in Store collection
MessageNumber contains message sequence number of the message whose associated data is changed.
Flags contains the updated value of the changed data.

UnSubscribe None None Removes a mailbox from server's subscribed mailbox list.

Example (ASP):
<% Obj.UnSubscribe() %>

Example (ColdFusion):
<CFSET Obj.UnSubscribe()>