Link to home
Start Free TrialLog in
Avatar of Rick Becker
Rick BeckerFlag for United States of America

asked on

500pts - Need help decoding an encoded e-mail Subject Line... Mime??

Greetings all,

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)

"=?iso-8859-1?B?U29sZCwgc2hpcCBub3cuIDAwNi0xMDEgQW5vdGhlciBCZWdpbm5pbmcgW0F1ZGlvIENEXSBSb2NrRm91ciA=?="

"Sold, ship now. 006-101 Another Beginning [Audio CD] RockFour"

Any help would be appreciated,

rrbecker

BTW - This running on a FreeBSD box....
ASKER CERTIFIED SOLUTION
Avatar of cwwkie
cwwkie

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Rick Becker

ASKER

Hi cwwkie,

Wow... Thanks for the tip and insight. I'll try it here in a bit and get back to you.

Again thanks....

rrbecker
Hi again cwwkie,

That works great.... Again thanks for the insite.

rrbecker
Avatar of cwwkie
cwwkie

If you run into more encoding problems, I can recommend the leetkey extention (http://leetkey.mozdev.org/) for firefox.
With that you can play in your browser encoding and decoding data. Very handy!
Hi cwwkie,

" ...I can recommend the leetkey extention...."

Thanks, for the link. I don't generally use Firefox but I'll fire it up and thake a look.

Again thanks,

rrbecker