473,747 Members | 2,668 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 ContentMediaTyp e. Unfortunately,
IBodyPart.SaveT oFile() 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.GetDe codedContentStr eam 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 OpenTnefStreamE x -
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 5248
* ce****@gmail.co m 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.co m 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
3427
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 text file and inserts it into a database. But right now i'm stuck at finding a way to code it so the text extraction doesn't start till after the second set of dashes, here is part of text file. I want to extract ACL ET AL SNIPELK 8-27-70-18 and so...
0
1015
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
1556
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 received by an Exchange server. I'm using the System.Web.Mail classes to generate my C# SMTP message. Can someone point me in the right direction for adding a TNEF stream to a message of this type.
2
2951
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 thinking about taking the Ruby code I found at http://www.zweknu.org/technical/index.rhtml?s=p%7c15
4
2512
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 hard time to understand vb syntax. I don't know if anyone in here can point out which is the equivalent object used in c sharp. Translate these two lines to C sharp: Sub Next_Click(Sender As Object, e As EventArgs) Select Case...
2
4557
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 System.Runtime.InteropServices.COMException (0x80004005): The client
5
2715
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 one? Thanks, Alan Isaac
16
4349
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 <string>
4
2826
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 main_program the problem is when i try to display any text on the textbox it shows the exception message as follows. Control.Invoke must be used to interact with controls created on a seperate thread.
0
9522
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9354
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9307
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8233
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6790
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6067
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4588
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3296
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2771
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.