Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Download attachment file
Message
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00825010
Message ID:
00825055
Views:
19
Hi Reza,

File attachments are contained in the message's body, very often at the end. They are encoded in a special way to exclude control characters used by mail processors.

If you open context menu for a message with an attachment in Outlook Express -- select Properties - Details - Message Source -- you can see how it is.

It starts from the header of a message, which contains lines
Content-Type: multipart/mixed;
boundary=...
a variable part

Follow the chain of "Content-Type" in the message's body, and eventually you will find lines similar to these

------=_NextPart_...
Content-Type: application/x-zip-compressed;
name="test.zip"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="test.zip"

UEsDBBQAAgAIANFB6y6srAVLigQAAO0lAAAVAAAAS1JBRlQvREFUQS9XUUxMT0cuREJG7dXBjiM1
EMbxLIu0K6GVEAcOnPICSC67u9NzjNlFRtBj9fZceEHEY9Iz027bVX9xhMtEmijzi1Wxnaov7v2H
7/56d7n8/e7Hi3m8v1x+e/qyHP/9si+7fFBL/rhvT5/vT1/2l58/7k8f1fvLUyovH7/fn75R7//5
9Xz5+MP+9K16/9Pl7fH8uDr52bvh7p3zIv5h/9tfverIuqBm0ocEKg404KftGlEX1Ex6w7o3rEv7
...


Now you have to extract the encoded part and decode it back to the original state.

This link contains all you need to start witn base64 decoding
http://fox.wikis.com/wc.dll?Wiki~Base64~SoftwareEng

This link shows how to work with WebDAV protocol, which is used to communicate with Hotmail servers
http://fox.wikis.com/wc.dll?Wiki~SendHotmailMessageFromFoxPro~VFP

Yahoo, as far as I know, supports POP3 protocol.
Previous
Reply
Map
View

Click here to load this message in the networking platform