473,396 Members | 1,961 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

TNEF again. Attachment extraction with C Sharp

I have a service, which acquire IMessage (CDO Interop) object from
datasource (binary restored eml (RFC822) message from SQL database).
And due to ms-tnef format of message - i can't extract attachments from
it. Is there any example how I should parse TNEF part
(I iterated over BodyParts, and found IBodyPart object with
application/ms-tnef as ContentMediaType. Unfortunately,
IBodyPart.SaveToFile() saves only complete object with formatting, but
I need only attachment, even without name, just attachment body as
array of bytes or string). I dig a bit to
IBodyPart.GetDecodedContentStream but also not sure what I should do
with IStream

I googled a lot, but everything (solutions, that i can code, not tools
that can extract attachments for me) pointed me to OpenTnefStreamEx -
but this is the part of MAPI, and I have no access (dedicated service)
to any Exchange server instance. And I cant interop mapi32.dll (with
TlbImp, - not valid COM error)
If I missed any other way to extract attach from TNEF stream - plz
point on it.

PS: Sorry for my weak English and messed explanation.

With best regards.

May 3 '06 #1
3 5219
* ce****@gmail.com wrote:
If I missed any other way to extract attach from TNEF stream - plz
point on it.


OS independent C source can be found here:
http://sourceforge.net/projects/tnef/

Shouldn't be much work to create your own utility class in C#.
May 3 '06 #2
* ce****@gmail.com wrote:
If I missed any other way to extract attach from TNEF stream - plz
point on it.


Also

http://sourceforge.net/projects/hpop/ is a .Net library that will do it
for you (or so it claims)
May 3 '06 #3
Thanks! OpenPop library sources help a lot.

May 3 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Kangol kangoll | last post by:
hi, i've been trying to figure out how to make visual basic start extracting text at a certain line to when i tell it to stop. I am making trying to make a program where it extracts text from a...
0
by: David Isaac | last post by:
I'm looking for Python code to extract files from MS-TNEF attachments. (I'm aware of the C code at http://tnef.sourceforge.net/ ) Thanks, Alan Isaac
0
by: Chris Hearson | last post by:
Hi All, I'm currently porting a VC++ app that generates SMTP messages to C#. Part of the generate message header is a TNEF stream that enables a custom form to be used when that email is...
2
by: Petri Savolainen | last post by:
Hello, has anyone seen such a beast? I tried googling, PyPI, Parnassus etc. but could not find any pure-python code nor extensions to interface with any of the existing implementations. I am...
4
by: Hai Nguyen | last post by:
I'm learning C sharp and do not like vb much. I'm creatiing a wepage using panel to test myself. I tried to use these code below, which is written in VB, and to transform them to c sharp but I got...
2
by: CTDev Team | last post by:
Hi, We are using Exchange Server 5.5, and have applications written in VB6 and C# that read and process emails. We are experiencing intermittent errors similar to C# Application ...
5
by: David Isaac | last post by:
I'm aware of http://cheeseshop.python.org/pypi/pytnef/ but it uses the tnef utility, and I'd like a pure Python solution (along the lines of http://www.freeutils.net/source/jtnef/ ). Is there...
16
by: EM.Bateman | last post by:
Working on Visual Studio .Net I've implemented a class: #ifndef CONTRIBUTOR_H #define CONTRIBUTOR_H enum Gender {male=1, female, unk}; #include <iostream> #include <iomanip> #include...
4
by: hussain3047 | last post by:
Hi i am a beginner in C sharp and trying to develop a wince 5.0 device application using C sharp. i am using a thread in the Form1 Load method which is continously running a method named...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.