+--- Converts a eml dump into a binary file
+-- @param input the file containing the eml-dump (defaults to dumpdata.eml)
+-- @param output the file to write to ( defaults to dumpdata.bin)
+local function convert_eml_to_bin(input, output)
+ input = input or 'dumpdata.eml'
+ output = output or 'dumpdata.bin'
+
+ local infile = io.open(input, "rb")
+ if infile == nil then
+ return oops(string.format("Could not read file %s",tostring(input)))
+ end
+ -- Read file, get BIN
+ local data = convert_ascii_dump_to_BIN(infile)
+ io.close(infile)
+
+ return save_BIN(data, output )
+end
+
+