If you feel some confusion about any thing or if you do not find what you are looking for, please inform us so that we can improve our documentation accordingly. docs@aspfusion.net |
![]() |
AdvIMAP4
The component allows you to perform retrieve and delete mail messages from any standard IMAP4 server, which compiles with RFC 2060, via a web page and offer much advanced functionality that IMAP4 server support. Access to the component can also be turned on at website basis like all other ASPFusion components. AdvIMAP4 is much more advanced component for mail access protocol IMAP4. The component exposes message headers via properties and handles quoted-printable and base64 decoding file attachments and embedded images also. It provides following operations.
The 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 ascending and descending given criteria.
It provides an advanced search mechanism, which can search any mailbox for messages on given 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 for handling mail attachments. Download operation allows downloading file to client browser with actual file name and DownloadAs operation allows downloading file to client browser with specified name.
<%set
Obj = Server.CreateObject("AdvIMAP4.IMAP4")%>
Property |
Description |
Attachment |
Required
for Append(optional) and RFC822(optional).
It is pipe sign '|' separated list |
AttachmentPath |
The
physical path where attachments will be saved |
AttachmentPathError |
Returns
1 if any error occur in AttachmentPath otherwise 0 |
AttachmentPathErrorReason |
Reports
any error that occur due to AttchmentPath |
AttachmentPathHTTP |
URL
for the AttachmentPath where attachments are saved |
Body |
Required
for Append(optional) and RFC822(optional).
It is body of mail message. |
CC |
Required
for Append(optional) and RFC822(optional).
It is cc address of mail message. It can be single address or semicolon ';'
separated list of addresses. |
DataItems |
Required
for Status, Fetch, Search(optional), Store, UidFetch, UidSearch(optional),
UidStore Valid
values are Status:
data items to be retrieved from specified mailbox e.g. messages, recent,
uidnext, uidvalidity, and unseen. One can also give combination of all
these, separated with space Fetch
and UIDFetch: it is fetch criteria. Valid values for fetch criteria
are getheader and getall Search
and
UIDSearch: e.g. “subject hello”. This 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 Store
and
UIDStore: data items to be updated. Valid values are flags,
flags.silent, +flags, +flags.silent, -flags, and -flags.silent. 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 |
DataItemValues |
Required
for Store, UidStore. Updated values for dataitems e.g. \seen, \deleted,
\flagged. |
DeleteFile |
If
this property is TRUE then file is deleted from server after downloading.
Valid values are FALSE (default) TRUE Example: <%Obj.DeleteFile = true%> |
DownloadForceFully |
If
this property is TRUE then file is downloaded forcefully. Valid values are FALSE (default) TRUE Example: <%Obj.DownloadForceFully = true%> |
ErrorReason |
Reports
any errors that occur during the request |
FlagsLists |
Required
for Append(optional). Flags that are to be set for message e.g.
\seen, \draft, \answered, \flagged and \deleted. One can also give
combination of all these separated with space. If not specified then no
flag is set |
From |
Required
for Append(optional) and RFC822(optional).
It is from address of mail message |
IsError |
Returns
1 if any error occur during the request otherwise 0 |
MailBoxName |
Required for 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: |
MessageLiteral |
Required
for Append. Message that is to be append in specified mailbox Message = Message & "Subject: Testing" Obj.MessageLiteral = Message%> |
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 |
MessageType |
Required for Append(optional) and RFC822(optional). It is type of mail message. Valid values are HTML (default) TEXT |
NewMailBoxName |
Required
for Rename and Copy |
OrderBy |
Required
for Fetch(optional), UidFetch(optional). Required 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 |
Password |
Required
for connection to server in all methods except if method is Capability |
Port |
Optional.
If not specified then default port 143 is used Example: |
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 |
ServerName |
Required.
Host name or IP address of the IMAP4 server |
SortFirst |
Required
for Fetch(optional), required for sorting mail messages first and then
return required mail messages. This parameter is only valid if parameter
DataItems contains GetHeader and ignored in case of GetAll. If parameter MessageNumberOrUID TRUE FALSE (default) Example: <%Obj.SortFirst = true%> |
Subject |
Required
for Append(optional) and RFC822(optional).
It is subject of mail message |
To |
Required
for Append(optional) and RFC822(optional).
It is to address of mail message. It can be single address or semicolon ';'
list of addresses |
Type |
This
property is used to set content type for the file to be downloaded.
Default value is application/octet-stream. Example: <%Obj.Type = ”application/zip”%> |
UserName |
Required
for connection to server in all methods except if method is Capability |
WildCard |
Required
for 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: |
Method |
Parameter |
Return Value |
Description |
Append |
None |
None |
Appends
a message to the specified mailbox |
Capability |
None |
Object |
Requests
a listing of capabilities that the server supports |
Check |
None |
None |
Requests
a checkpoint of the mailbox, which is specified |
Close |
None |
None |
Closes
the mailbox and remove all messages that are flagged for deletion |
Copy |
None |
None |
Copies
the specified message(s) from one mailbox to the end of the destination
mailbox |
Create |
None |
None |
Create
a mailbox at server with the name specified |
Delete |
None |
None |
Delete
a mailbox from server with the name specified |
DeleteMessages |
None |
Object |
Delete
specified message(s) from the mailbox using their sequence numbers |
Download |
Source |
None |
Download
the source file to client’s browser |
DownloadAs |
Source |
None |
Download
the source file with given name to client’s browser |
Examine |
None |
Object |
Select
a mailbox at server for read-only access |
Expunge |
None |
Object |
Remove
all messages that are flagged for deletion |
Fetch |
None |
Array
of Objects |
Retrieves
the data associated with messages, according to the specified fetch
criteria using message sequence numbers |
List |
None |
Array
of objects |
Requests
a list of mailboxes at server |
Lsub |
None |
Array
of objects |
Requests
a subset of user defined "active" or "subscribe"
mailbox names |
Rename |
None |
None |
Rename
a mailbox at server with the new name specified |
RFC822 |
None |
Object |
Return
RFC822 format
message which can be further 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 |
Select |
None |
Object |
Select
a mailbox at server for read and write access |
Status |
None |
Object |
Requests
the status of a particular mailbox at server |
Store |
None |
Array
of objects |
Updates
message data associated with message sequence numbers in a specified
mailbox |
Subscribe |
None |
None |
Adds
the specified mailbox name to the server's set of "active" or
"subscribed" mailbox list |
UIDCopy |
None |
None |
Copies
the specified message(s) using their unique identifiers from one mailbox
to the end of the destination mailbox |
UIDDeleteMessages |
None |
Object |
Delete
specified message(s) from the mailbox using their UIDs |
UIDFetch |
None |
Array
of objects |
Retrieves
the data associated with messages, according to the specified fetch
criteria using message UIDs |
UIDSearch |
None |
Object |
Search
the mailbox for messages that match the given search criteria and retrieve
the corresponding message unique identifiers |
UIDStore |
None |
Array
of objects |
Updates
message data associated with message unique identifiers in a specified
mailbox |
UnSubscribe |
None |
None |
Removes
a mailbox from server's subscribed mailbox list |
Copyright © 2000, Advanced Communications |