473,435 Members | 1,622 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,435 software developers and data experts.

Extracting Attachment from .eml file through VB.net

I need to extract all information from .eml file without using outlook
express. I am able to extract all the information except Attachments. Can
somebody please suggest some solution ??
Nov 21 '05 #1
2 11145
* "=?Utf-8?B?VmlrYXMgR3VwdGE=?=" <Vikas Gu***@discussions.microsoft.com> scripsit:
I need to extract all information from .eml file without using outlook
express. I am able to extract all the information except Attachments. Can
somebody please suggest some solution ??


Messages are often encoded in MIME format:

<URL:http://www.mhonarc.org/~ehood/MIME/>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #2
You can use CDO for Exchange 2000 (CDOEX), load the eml into a CDO.Message
object, then you can access the message attachments directly.

Dim strm As ADODB.Stream
Dim myMail As New CDO.Message
strm = myMail.GetStream()
strm.Type = ADODB.StreamTypeEnum.adTypeText
strm.LoadFromFile("c:\file.eml")
strm.Flush()
Dim attach As IBodyPart
For Each attach In myMail.Attachments
MsgBox(attach.FileName)
Next

Cheers,
John Wadie

Nov 21 '05 #3

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

Similar topics

4
by: Ravi | last post by:
Iam trying to open an self extracting zip file from my windows application. it opens an command window and does not do any thing afterwards. here is the code iam doing it. ...
2
by: Zameer | last post by:
Hi All, I want to know how i can add attachment file to form for a particular user.Its like user fills his information on form and he can add an attachment file if he wants.And later when you...
3
by: Leszek | last post by:
Hello! I'm trying to create a cab file and extract it. XP is using a library for it, but i cannot find anything about it.... I don't want to use 3rd party's tools like cabarc/compress/extract....
6
by: rlntemp-gng | last post by:
I need to extract information from some Excel files but am stuck with part of it: As an example, I have the following Excel File that has 3 tabbed sheets: FileName: ...
1
by: =?Utf-8?B?UmFqdSBB?= | last post by:
hi, Can any one help me .. how to save outlook attachment file in C# windows Application... i m able to read the filename but i dont know how to save the attachment file to my local Drives......
2
by: cnsabar | last post by:
Hi., Is there any perl modules available for extracting .sit files Looking for Ur help and suggetions Thanks Sabarish
0
by: Cat | last post by:
Response.AppendHeader("Content-Disposition", "attachment; filename=ѧ У.txt"); This works correctly on Opera, FireFox or Safari. But on IE, the file name gets broken. Setting HeaderEncoding to...
3
by: sbettadpur | last post by:
hello I designed a web application using php and mysql for this i need to extract mail attachment from outlook express (specifically .doc files) for this is there any API's or any class or any...
0
by: littlemaster | last post by:
The following program will send the mail with specified attachment file.Need to give the absolute path of the file. require "rubygems" require "ruport" require "ruport/util" r =...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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,...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.