500pts - Need help decoding an encoded e-mail Subject Line... Mime??
Posted on 2006-06-17
I have a routine that I have been using to 'Parse' email as it arrives. It mainly looks at the 'Subject' line to determine if it is something that I need to read and parse further.
Quite frankly I'm parsing email from Amazon. I look for 'Sold - ship now' to determine if an item has sold and I print a mailing lable for it as soon as I parse the email for name and address.
The problem is that Amazon has now encoded the subject line so that when I read the 'raw' data I no longer 'see' the "Sold - ship now" string that I was originally parsing.
I have tried to decode the string with /usr/local/bin/base64 but that results in an error telling me that '?' are not proper for base64.
So I need to know if there is a 'C' function available that will decode this mime type. The following is the encoded string and what the decoded string should say: (with out the quotes)
"Sold, ship now. 006-101 Another Beginning [Audio CD] RockFour"
Any help would be appreciated,
BTW - This running on a FreeBSD box....