Archive of UserLand's first discussion group, started October 5, 1998.

Re: Can I script Outlook Express or Eudora?

Author:Howard Hansen
Posted:9/7/1999; 10:53:57 AM
Topic:Can I script Outlook Express or Eudora?
Msg #:10678 (In response to 10629)
Prev/Next:10677 / 10679

In response to your request, I've written a VB dll to archive messages to an XML format. You'll need to register the dll on your system type "regsvr32 " at the command prompt.

Once that's done, just double-click the exe file and you'll get a quick test-harness application.

I wasn't sure how Frontier liked to work with COM objects -- if it preferred passing all of the parameters as arguments to a method, or would just as easily set the properties separately, then excecute the function. So I implemented both. For the one-liner, just call the ArchiveMesssages method on an object created with the progid "ArchiveEu.Archiver". If it succeeds, the method returns the value 0, if a problem occurs, it'll return something else.

EudoraFolderToArchive As String

  • Which mail folder do you want to archive defaults to "", which archives all folders.
  • DaysOlderThan As Integer
  • Archive all messages older than this number of days.
  • DeleteArchivedMessages As Boolean
  • Delete messages as they are archived? Defaults to false.
  • ArchiveSubfolders As Boolean
  • True (default) = archive all subfolders of the folder specified in EudoraFolderToArchive
  • DestinationPath As String
  • Archive selected messages to what file -- provide the full path!
  • SaveAsUnicode As Boolean
  • True = save xml file as unicode, defaults to false = non-unicode xml file.
  • OverwriteExisting As Boolean
  • If true, archive XML file overwrites an existing file with the same name. Defaults to false.
  • ArchiveBaseDate As Date
  • Archive messages based on this date. Defaults to time COM object is instantiated.
    (not available with ArchiveMessages version of call, unless someone wants it!)
  • Bugs:

  • the folder recursion implementation doesn't seem to work correctly right now, so I'd do a folder at a time.
  • stores the HTML representation of the message body, which may have a different encoding than the base XML. I've run into problems with accented characters, etc. Perhaps it would be better to store the text version of the body.
  • Date code currently ignores the UMT delta value, since VB doesn't understand it natively yet.
  • XML:

    Here's an example of the XML for an archive:

      08:39 PM 1/8/98 +0000
      Order Dept
      Order 15518

        (Order Dept)
        Thu, 08 Jan 1998 13:39:18 -0700
        Order 15518<;/headerto>

    Dear Howard,
    Thanks for your order.&nbsp; Unfortunately we are out of:
    Beck Clash Elvis Costello Ella Fitzgerald Roches
    but we have pulled the other CDs for you.&nbsp; Please let us know if we should proceed with the order.
    We are unable to accept additions or substitutions.
    Thanks, ss

    The following fields have & replaced with &amp; and < replaced with &lt; in their values: from, subject, to, bcc, cc, headerfrom, inreplyto, msgID, persona, references, replyto, headersubject, headerto, and messagebody. This might cause problems later on, and more fields may need to be xml encoded.

    This page was archived on 6/13/2001; 4:52:27 PM.

    © Copyright 1998-2001 UserLand Software, Inc.