Dart Home | PowerTCP Mail for ActiveX | Custom Development | Reply | PowerTCP Mail for ActiveX Topics | Forums |
Author | Forum: PowerTCP Mail for ActiveX Topic: Decoding Mime Attachment from File using VB6 |
User900 Posts: 6 Member Since: 02/21/01 |
posted May 4, 2004 1:48 PM Hi there, I have the Dart Mail Tool and have used it up till now for simple e-mail sending. I now have a requirement to extract a text attachment from a mime encoded file. We have set up a filter on our mail system that will copy the whole e-mail to a text-file, the problem is that if the text-file attachment is of any size at all it get's mime encoded. Can someone provide me with some sample code that will read in a mime-encoded file and output just the text-file attachment from it? This is my only requirement, so I don't need to fully understand how mime works. Many thanks. Gregor. |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted May 4, 2004 2:00 PM Please take a look at the Pop client sample, there is a form that shows the parts of a message. In order to do what you want, you would first have to make sure that the Pop controls AttachmentDirectory property is set to "" so that the data would be kept in the message. Then you need to go through the parts and look for any that are of type "text/plain" and have a filename. When you find one, use a File IO operation to save Part.Data to a file. If you need a specific sample written, please contact David Harry (sales@dart.com) and he will explain the options to you. |
User900 Posts: 6 Member Since: 02/21/01 |
posted May 4, 2004 5:34 PM Thanks, I contacted David - but the only options he can offer are too expensive. It seems to me to be a very small requirement with maybe just a minimal amount of coding required. Are there any other users out there that have done something like this already? Is there sample code somewhere that I've not found that does it? Thanks in advance! Gregor. |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted May 4, 2004 7:00 PM There's no sample code that does EXACTLY what you want, but as I stated above the POP sample has some code that may help. Which part of the process that I outlined above are you having trouble with? |
Reply | PowerTCP Mail for ActiveX Topics | Forums |
This site is powered by
![]() |