OutlookToHtml
HOWTO extract emails from outlook to external files
Background
I was to extract all my mail to simple files to be able to put them in an searchable archive,
an index server with easy access to the history...
One solution
This simple tool extracts all emails between 2 dates from outlook and puts them into files,
through a template (html) file.
The attachments are extracted and linked to a separate directory.
You can restrict which emails to extract with dates and minimum body size.
More info:
- Outlook version 2000/2003/2010..
OutlookToHtml.exe
- 1 select from which outlook-folder to extract from.
- 2 mail-template-file
- see below for template file format.
- 3 mail output directory
- root directory for output files. Emails will be saved in root + year + filname.htm
example: c:\archive\email\you\2005\m200502021200_subject.htm (root)
- 3b attachments output directory
- attachments will be outputed to root+att directory.
Filenames of attachments will be lowercase simple filenames.
Filenames will be appended with a number for equal filenames (filename_n.ext).
Many mails with the same attachment file will result in only one extracted file.
- 4 date/times
- select only emails FromDateTime to ToDateTime (local formatting)
- 5 Body size
- select only emails with body larger than nn characters
- 6 start extracting
- 7 stop extrating (break)
From outlook to textfiles (html-files)
- Start OutlookToHtml on the same machine where Outlook is installed.
- [Logon via mapi to Outlook]
- Select folder and root directory
- Restrict with datetimes and body size
- Go
Download and go
- get OutlookToHtml
outlooktohtml.zip
- Extract the OutlookToHtml.exe and run.
- The default template file OutlookToHtml-template.htm is created, perhaps edit it..
Versions
- 2012-feb-02, version 1.2
- Some fixes, inline images now linked from html file (from a attsimgs folder)
- 2005-apr-10, version 0.2
- Added attachment extraction
- 2005-feb-27, version 0.1
- Initial version
More info
if you like we can help you with extracting other outlook entries..
More info/questions from:
Subject: OutlookToHtml
Template file format
Template files are textfiles where the following tags are replaced with values from outlook emails
Attachments (will also save the attachment files ..)
BillingInformation
Body
Categories
Companies
EntryID
MessageClass
Mileage
OutlookInternalVersion
OutlookVersion
Subject
BCC
CC
ConversationTopic
FlagRequest
ReceivedByName
ReceivedOnBehalfOfName
ReminderSoundFile
ReplyRecipientNames
SenderName
SentOnBehalfOfName
To
VotingOptions
VotingResponse
CreationTime
LastModificationTime
DeferredDeliveryTime
ExpiryTime
FlagDueBy
ReceivedTime
ReminderTime
SentOn
NoAging
Saved
UnRead
AlternateRecipientAllowed
AutoForwarded
DeleteAfterSubmit
OriginatorDeliveryReportRequested
ReadReceiptRequested
RecipientReassignmentProhibited
ReminderOverrideDefault
ReminderPlaySound
ReminderSet
Size
SizeKB
DateTimes
Example template file format
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="generator" content="<#AppName> v<#AppVer> (<#DateTime>)">
<META name="author" content="<#SenderName>">
<TITLE><#Subject></TITLE>
<STYLE>
BODY { font-family: sans-serif; margin 1em }
H2 { border-bottom: solid 2px black }
TH { text-align: left; }
TT { font-family: "Lucida Console" }
PRE { word-wrap: break-word }
</STYLE>
</HEAD>
<BODY>
<H2><#Subject></H2>
<TABLE>
<TR valign=top><TH>Skickat:<TD><#ReceivedTime><TD width=100px align=right><SMALL>(<#SizeKB>)</SMALL>
<TR valign=top><TH>Från:<TD><#SenderName>
<TR valign=top><TH>Till:<TD><#To>
<TR valign=top><TH>Bilagor:<TD><TT><#Attachments></TT>
</TABLE>
<PRE>
<#Body>
</PRE>
<PRE style="font-size: 80%; color: silver">
EntryID=<#EntryID>
Datetimes=<#DateTimes>
</PRE>
</BODY>
</HTML>
Keywords:
Microsoft,email,epost,Windows,Exchange,OutlookToHtml,Outlook2Html,MailToHtml,Mail2Html,OutlookExtract,Outlook,Extract,MailExtract,Attachment,Attachments,Extractor