473,785 Members | 2,910 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Extract body from MIME message

I need to acquire content body of MIME encoded message (as IMessage
object).I want using C# and CDO Interop extract such data
("eJ8+IggVAQaQ. .." unicode part).

Here is example of Bodypart (complete original here
http://msdn.microsoft.com/library/de...kbone_767n.asp)

------ =_NextPart_000_ 01BAE995.CB66A2 90
Content-Type: application/ms-tnef
Content-Transfer-Encoding: base64

eJ8+IggVAQaQCAA EAAAAAAABAAEAAQ eQBgAIAAAA5AQAA AAAAADoAAEIgAcA GAAAAElQTS5NaWN y
b3NvZnQgTWFpbC5 Ob3RlADEIAQWAAw AOAAAAzAcBABcAD QAWAAYAAgAWAQEg gAMADgAAAMwHAQA X
---cutted----

------ =_NextPart_000_ 01BAE995.CB66A2 90--
I tried to obtain it through CDO.IBodyPart.G etStream() ( I also tried
GetDecodedConte ntStream, same result) but any attempts to Read() or
ReadText() from ADODB.Stream
throws ExecutionEngine Exception or NullReference one.
Saving to file works fine but I want to do all operations in-memory
(SaveToFile have only one parameter - path to file - unable to replace
it with any Stream-like object)
I dont sure how to use ADODB.Stream, but according to debug info - it's
opened, position in the begining of the stream, other properties look
correct either. But no luck with read from.

Any ideas or detailed RTFMs (MSDN didn't enlighten about this problem)

PS This message is second part of problem with getting attachments from
MS-TNEF encoded message. I was pointed to OpenPOP Library, but
unfortunately OpenPOP TNEFparser implementation isn't good enough
(maybe only in my case =( ), and now I'm going to extract body and
decode it by hands with some help of OpenPOP TNEFParser.

May 5 '06 #1
0 2087

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

Similar topics

6
3483
by: mike | last post by:
I have created a side application in VB.NET which reads rows from a DB and builds an email message. when i have a long string the the mailmessage.body or the mailmessage, it puts in an "!<linefeed><space>" at about every 980th space. I have confirmed that these characters are not in the string or the message body before the email is sent. Has anyone seen this or have any thoughts? Thanks
1
1585
by: Richard Moore | last post by:
Hi, Not sure if this is entirely an XML issue - but if I send an XML document in the message body of an email it gets mangled as follows... <dsOrderSummary= xmlns=3D"http://www=2Etempuri=2Eorg/dsOrderSummary=2Exsd"> The line of XML should actually read... <dsOrderSummary xmlns="http://www.tempuri.org/dsOrderSummary.xsd">
0
1356
by: desi.american | last post by:
I'm using System.Web.Mail to send an email message from an ASP.NET web page. This is the main section of the code. //************* start code ***************************** string mailHost = (System.Configuration.ConfigurationSettings.AppSettings.GetValues("mailserver")); //Get data from page string toAddress =
1
1775
by: Michael March | last post by:
I am been playing with the 'email' and 'mailbox' modules trying to read in an email at a time from an mbox file, add something to the body of a message and then write that change back out in 'mbox' format again. Is there any code floating around out there that allows you to take a message from 'mailbox', modify it with 'email' and then write it back out via 'mailbox' again? thanks!
16
7077
by: anya | last post by:
Hey, I have a certain problem and till now I didnt find an answer on the web. I want to send an email message with picture in it. I dont want to put it as attachment but make it in the body of the mail, so every one who open the email will see the picture.. (it is possible that the solution will be in any other format that will be opened i.e pdf, doc and I will put this in the body )
9
9409
by: flit | last post by:
Hello All, Using poplib in python I can extract only the headers using the .top, there is a way to extract only the message text without the headers? like remove the fields below: " Return-Path: X-Original-To: Received: from
7
7647
by: erikcw | last post by:
Hi all, I'm trying to extract zip file (containing an xml file) from an email so I can process it. But I'm running up against some brick walls. I've been googling and reading all afternoon, and can't seem to figure it out. Here is what I have so far. p = POP3("mail.server.com")
4
1853
by: sadieslc | last post by:
I'm working on a PHP script, and the info from the form shows up in the headers of the email that I receive, but it doesn't show up in the body of the email. Can you please help me figure out what I'm doing wrong? Here is the script: <? function send_mail($emailaddress, $fromaddress, $emailsubject, $body) { $eol="\r\n"; $mime_boundary=md5(time()); # Common Headers
2
1837
by: urbanedge | last post by:
I've just acquired a site and uploaded to godaddy and the email function won't work. I'm new to php and I'm not able to determine where the issue is. I've commented out $this->header .= $this->body; and I get a blank email to send. I've stripped down the body file but there still seems to be a problem. I'm not sure where to look now. This is the body file. <?php /******************** EMAIL ***************************/ $sRuta =...
0
9645
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10327
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
10151
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...
0
9950
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8973
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...
0
5381
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...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4053
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
3
2879
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.