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.

When you need to parse received messages, it might be hard to check all the possibilities that one simple mail message may contain. We all used to receive simple email messages - few headers and body text. But, sometimes you get attachments, multipart messages, different encodings and stuff like that. It's almost the same for wodMailbox - it's light, quick and fully supports all mail related RFC's.

You can look on using wodMailbox for three main purposes:

  • When you want to access mail messages in the mailbox
  • When you want to access and parse one mail message
  • When you want to prepare and create new message


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.

Decoding? Encoding? Of course. wodMailbox supports UUENCODE, BASE64, BINHEX4 and QUOTED-PRINTABLE encodings, which are de-facto standards in today email messages. If you notice you need something else, just ask. You will find it in next version.


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.

Once you want to access such mailbox, you just pass it's reference to wodMailbox.Filename property, and call Lock method. At this moment, wodMailbox will open the mailbox and count all the messages for you, but trying to use as low amount of memory as possible. This way, it can open and parse large mailboxes (few megabytes is considered to be 'small' at this point) with ease. Once opened, you can check total number of messages inside using Count property, or access messages collection using Messages property.

When you access particular message, you will see wodMailbox did it almost instantly instead of you, using really low amount of memory and low hard disk usage. Here you can check out message Size, total number of headers and headers contents (for instance most popular headers From and To), and check out message Text.


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.

Easy, isn't it?

NOTE: DEMO version of wodMailbox will access only first 10 messages from the mailbox, and will allow only one attachment per message.