email2xml

From VxOware

Revision as of 15:58, 8 March 2010 by WikiSysop (Talk | contribs)
Jump to: navigation, search

Email2XML Service

1 Specification

User sends an email to

username@emailaccount.com

Service monitors an email account (username and password are specified in an XML config file). When a new email appears in the account with the To: line containing

TOSTRING

or From: line containing

FROMSTRING

The service downloads the email and its attachement and puts it into an XML file of the form (based on [1])

<fromaddress/>
<toaddress/>
<cc/>
 
<contenttext>
</contenttext>
 
<attachments>
 <attachment>
  <filename/>
  <filetype/>
  <filedata64/>
</attachments>

I suppose there should be an option for specifying the From: line too. Perhaps the config file should have these options in XML:

 USERNAME
 ACCOUNT
 PASSWORD
 TOSTRING
 FROMSTRING
 POLLINTERVAL
 DELETEAFTER
 OUTPUTFOLDERROOT

This XML file is dropped into a directory that is based on the string ACCOUNT, and the filename has the form

USERNAME/ACCOUNT/YYYY-MM-DDTHH:MM:SS-SubjectLineString.xml

Based on this xml file, these files should be created

  • USERNAME/ACCOUNT/YYYY-MM-DDTHH:MM:SS-SubjectLineString-NoMIME.xml
  • USERNAME/ACCOUNT/YYYY-MM-DDTHH:MM:SS-attachments/file1.png
  • USERNAME/ACCOUNT/YYYY-MM-DDTHH:MM:SS-attachments/file2.png

where file1.png and file2.png are the file names derived from the original email.

2 User Interface

  1. Go to http://vxoware.org/email2xml
  2. Enter USERNAME, ACCOUNT (SMTP address), PASSWORD, TOPATTERN, FROMPATTERN, POLLINTERVAL
  3. Go to http://vxoware.org/email2xml/USERNAME to see the directory of files that have been created.

3 References

This looks most promising:

Others:

To discuss - what context to run it in: