Merchant Archive
Thread: Merchant Email to XML Program Now Available
All,
I wrote a windows program in .Net for processing vendor emails. Heres the gist:
1. Use the /mailsave function and you will get the emails in a local folder.
2. You set up a project that is an XML file (the program does it for you) that contains the Email folder for your char and the output file for the XML.
3. You hit 'Process Emails' and you get an XML file with the sales data.
4. You can then open that file in Excel or your program of choice.
The program is availabel in a zip file at http://www.thedotcommakesitfunny.com/swg/it is called the SWG Merchant Email Processor.
A couple of things to keep in mind:
1. This program is an ALPHA release. It works, it might have bugs, but it does work. It's definitely pre-beta.
2. The program fulllyrecreates the output XML from the email foldereach time it is run. So if you move the emails or delete them, you will get a new file without the ones you deleted. You could get around this by dating or otherwise revisioning your output files and then combining them. I left this open, cause it was troublesome to code and because I figured everyone would want to deal with their emailsdifferently so this is more flexible.
3. The program looks for emails from SWG.*ServerName*.Auctioner ... it skips the emails about items delisting. However, I am unsure what other emails the auctioner might send and have been unable to test them all. One example might be if the vendor sends an email when its maintenance gets low, not sure what the program will do in that situation (probably blow up).
4. The program is written in .Net so you will need to have the .Net framework. You can get it from Windows Update or from Microsofts site.
Enjoy! Andplease send any comments, bug reports, feature requests, etc. to [email protected]
Thanks,
Hi,
if it would not mean to invite mr gates to my pc, i might try it.
Read ya.
I tried deleting emails, but it crashed and crashed. Then I stood back with only 8 emails. One of these was an email from a bazaar sale. It still crashed. When I deleted this bazaar email, the application created the xml file flawlessy.
I will check if this is still the case in the new version when I come home.
Hi Pepe,
well, I dont want to install .net, thats all .-)
Read ya.
217 vendor emails processed, no errors occurring in alpha 4 for me. Good job.
I saved a message and reverse engineered the TIMESTAMP to known date/time in message using Excel.
The timestamp is number of seconds elapsed since a reference date & time.
Looks to me like the reference date/time is: 1 Jan 1970 06:00:00
To convert timestamp to date & time:
days = @int(timestamp/86400) {divide by total number of secs in day to find number of days}
remainder = timestamp - (days * 86400) {find number of seconds remaining on current day}
hour = @int(remainder / 3600) {find number of hours}
remainder = remainder - (hour * 3600)
minutes = @int(remainder/60) {find number of minutes}
remainder = remainder- (minutes * 60)
seconds = remainder
In Excel, add days to reference date (1/1/1970) to get the current date.