XMLMail
Being a contractor and usualy on the move I needed a way of recording all my expenses so I decided to knock up this little system.
It consists of 3 parts
- An HTML form to enter the info.
- A PERL script or ASP Script to send the form as XML.
- An Outlook client to get the XML.
The HTML form is working and will send mail to your email address so that you can test the client. You can also use it at any time to keep track of your expenses.
I didn't want to just write a PERL script that stored the info in a file at my ISP because they don't take responsibility for any files stored there. I decided to mail the form results to myself as I collect my mail at regular intervals. I modified the form2mail PERL script to mail XML instead of the usual text message. When it arrives it looks something like this.
<?xml version="1.0" encoding="UTF-8"?>
<expenses>
<SubmittedBy date="Tue Feb 20 12:47:00 2001"> xmlmail@bayes.co.uk </SubmittedBy>
<InvoiceDate>20-Feb-2001</InvoiceDate>
<InvoiceFrom>test co</InvoiceFrom>
<InvoiceFor>Other</InvoiceFor>
<InvoiceAmount>100.00</InvoiceAmount>
<InvoiceVat>17.50</InvoiceVat>
<InvoiceTotal>117.50</InvoiceTotal>
<VatNumber>1234</VatNumber>
<description>this is a description </description>
</expenses>
I use Outlook 98/2000 as my mail client and I set it up to put all mail from
myexp@bayes.co.uk into my expenses folder. I guess it can be modified to work
with other email clients. Eudora
has a similar automation object model.
Next I needed to be able to do a few things with it
- Save it as an XML file.
- Format and print it.
- Load it into my expenses Access database.
- Forward the formatted text to my accountant.
Some of the things it demonstrates
- Things to do with email in XML format.
- Another treeview in XML/XSL/DHTML.
- B2B via email.
- Outlook Automation.
- Access Automation.
- File System Automation.
A very rudimentary XSLT stylesheet formatxml.xslt is provided in the release. You will need to modify this to create more complex output.
This is changing fast so if you download it and find it usefull you might want to check back for a new copy. As this is only alpha software let me have your feedback.