WeOnlyDo! COM Mailbox ActiveX Control Introduction |
® WeOnlyDo! COM (2002-2010) |
General information WeOnlyDo ! COM Mailbox is a component that can be easily
integrated into your applications to provide full management
over mailboxes and for message parsing. Using wodMailbox, you
can easily access mailbox, count messages, look at messages,
count parts, save attachments, look at headers, delete messages
etc.. When wodMailBox opens mailbox, it expects to find there
either regular mailbox just as is used on UNIX systems (one
file with full mail messages one after another) or just one
message inside, just as Outlook Express saves .EML
files.
Fast access to the message If you don't need mailbox features, and just want to open message from the file - you can use Message.Peek method. It will open the message and only parse headers - giving you incredible speed of access, which is convinient when you need to access headers of 1000 messages. Even more, it will give you typical message properties, such as From, Subject, To, ContentType etc..
Retrieve HTML and plaintext content Even you can access message parts and read their content-types to determine if you're interested in that message part, you can use HTMLText and PlainText properties to automatically get access to those message types - if they exist. wodMailbox will scan message parts for you and return plaintext and html content only if it exists - and will do it very fast!
Open, read, save attachments! When you need to access attachments, wodMailbox will help
you a lot. Each message has Attachments property where all the
attachments (in all subparts) are already listed. This is a bit
strange implementation, since attachments are 'hidden'
inside parts so it would be more appropriate to access them
from there. Well, noone says you can't do that - but you
don't have to. Main message will collect them all for you,
all you need to do is call Save method and provide some
filename (or leave default, as specified by sender) and
attachment will be decoded and saved.
Easy to use with our wodPop3Server, wodSmtpServer and wodImapServer Using together with wodPop3Server and wodSmtpServer (or any
other UNIX-alike server) you will notice that easiest way to
store messages on per-user basis in files. So, one file contain
all the messages for one user. If user moves to different
computer or account, it's easiest this way to move his
email also. Moreover, IMAP and similarly 'larger'
protocols keep all the mailboxes this way - all users'
messages in one file, on per-user basis.
Multipart messages - sure! Interested if message is multipart? No problems. There is Parts collection that already split message (if message was multipart) to different Message objects so you can easily examine it. You should notice here that each Part is in fact new Message object - so that messages can be nested inside one mail message recursively unlimited number of times. And each such message can optionally have some attachments and some parts, and will have it's own headers (different than main message) etc.
Create new messages! So, what, you want to know if you can prepare new messages
to be sent using wodMailbox? Oh, yes, of course! You can always
create new message using Add method, set it's Text, add few
Headers, add Attachments, and wodMailbox will generate file for
you you can just 'pass' to any mail client (or mail
server) to be posted to someone's mailbox. |