GSAK (Geocaching Swiss Army Knife)
Contents - Index

Download type (File=>Get e-mail)

The GetMail dialog is primarily for retrieving attachments from a pop3 account (Attachments option) so you can load GPX/ZIP files into the database. However, if you select the "Message + Body" option, the dialog changes slightly to remove options associated with attachments and also adds a box for file output to store the results of your download.

All the message headers and corresponding bodies are placed in this file. You can then read this file into a macro and interrogate each message. I have added $GSAKMSG$ between each message, and inserted $GSAKBODY$ between the message header and message body. This should enable you to easily extract out each message and the corresponding section.

Macro code to read and interrogate this file would go something like:
 

$Data = GetFile("c:\temp\msg.txt")
$NumberOfMessages = RegExCount(RegExEscape("$GSAKMSG$"),$data)
$mCount = 0
While $mCount < $NumberOfMessages
$mCount = $mCount + 1
$Message = Extract($Data,"$GSAKMSG$",$mCount)
$Header = Extract($Message,"$GSAKBODY$",1)
$Body = Extract($Message,"$GSAKBODY$",2)
 
# Insert code here to interrogate $Header and $Body

EndWhile

Copyright 2004-2019 CWE Computer Services  
Privacy Policy Contact