 |
|
 |
Has anyone got MimeSniffer.Load(streamObject) in VB.Net to work? If you have can you post your example. Thanks.
|
|
|
|
 |
|
 |
I'm attempting to open the eml, change the From addy to the ReplyTo addy and save....
Not getting errors, but the dec.From(0).Address doesn't change...what am I missing here?
Many Thanks for any assistance....
Set dec = CreateObject("MimeSniffer.Decoder")
folderspec = "C:\processor\"
filespec = "a734e77e01caa43500000008.eml"
dec.LoadFromFile folderspec & filespec
'MsgBox "From is: " & dec.From(0).Address
'MsgBox "Should be: " & dec.ReplyTo.Address
dec.From(0).Address = dec.ReplyTo.Address
dec.SaveToFile folderspec & filespec
|
|
|
|
 |
|
 |
Could any body tell me why I failed to create instance here in the following code ?
I used the same code as that used in the sample demo...
but alway be MessageBox.....
IMimeDecoderPtr Decoder;
if(SUCCEED = Decoder.CreateInstance(__uuidof(MimeDecoder)))
{
//read Mime Object
}
else
{
MessageBox("Fail");
}
|
|
|
|
 |
|
 |
Dear sir, I am using the "MimeSniffer.dll" for opening the eml files. The eml files without the attachment is opened perfectly without any problems. But when i tried to open the eml file having attachments, i was not able to get the body text. I have pasted the content of eml file, that i tried to open, below: Please suggest me some solution for this. /*****************************Eml File Content******************/ From: <xyz@xyz.com> To: <abc@abc.com> Cc: <xyz@xyz.com> Subject: test mail Date: Thu, 22 Jan 2009 10:15:32 +0530 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0038_01C97C7A.5EBA6CE0" X-Priority: 3 X-MSMail-Priority: Normal X-Unsent: 1 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 This is a multi-part message in MIME format. ------=_NextPart_000_0038_01C97C7A.5EBA6CE0 Content-Type: multipart/alternative; boundary="----=_NextPart_001_0039_01C97C7A.5EBA6CE0"
------=_NextPart_001_0039_01C97C7A.5EBA6CE0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable hi=20 this is test mail. hi=20 this is test mail. ------=_NextPart_001_0039_01C97C7A.5EBA6CE0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-1"> <META content=3D"MSHTML 6.00.2900.3492" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2>hi </FONT></DIV> <DIV><FONT face=3DArial size=3D2>this is test mail.</FONT></DIV> <DIV> <DIV><FONT face=3DArial size=3D2>hi </FONT></DIV> <DIV><FONT face=3DArial size=3D2>this is test mail.</FONT></DIV> <DIV> <DIV><FONT face=3DArial = size=3D2></FONT> </DIV></DIV></DIV></BODY></HTML> ------=_NextPart_001_0039_01C97C7A.5EBA6CE0-- ------=_NextPart_000_0038_01C97C7A.5EBA6CE0 Content-Type: image/bmp; name="sample.bmp" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="sample.bmp" Qk0OCAAAAAAAAD4AAAAoAAAAhgAAAGQAAAABAAEAAAAAANAHAAAAAAAAAAAAAAAAAAAAAAAAAAAA AP///wAAAAAAB+D/z//////38A//eAAAAAAAAAAD/nv87/////fAA//4AAAAAAAAAAD///////// /8AB//wAAAAAAAAAAP//3//////H78B/nAAAAAAAAAAAP///////////4H/8AAAAAAAAAAA////+ ///////4f/wAAAAAAAAAAD///9//4P////w//AAAAAAAAAAA/n///////////z/8AAAAAAAAAAH+ fv//////////t/wAAAAAAAAAAf+f//5////5/////AAAAAAAAAAA/94I////8D/P///wAAAAAAAA AAAH//////8Bf/////wAAAAAAAAAAAP//////Hn////wfAAAAAAAAAAAA//////////v//54AAAA AAAAAAAB/+D3///////v/vgAAAAAAAAAAAA//////////3///AAAAAAAAAAAAAf////////////8 AAAAAAAAAAAAA///////////H/gAAAAAAAAAAAAD////////////6AAAAAAAAAAAAB////////// //+IAAAAAAAAAAAAP////////////xgAAAAAAAAAAAB////////////+AAAAAAAAAAAAAH////P/ //////4QAAAAAAAAAAAAH///wf///////jwAAAAAAAAAAAAf///A///////8PAAAAAAAAAAAAA/f /8D////////8AAAAAAAAAAAAD///wP////////wAAAAAAAAAAAA////A/////////AAAAAAAAAAA AD///8D////////8AAAAAAAAAAAAH///wD///+9+//wAAAAAAAAAAAAP///AP////3/3vAAAAAAA AAAAAA///+Af//8P///8AAAAAAAAAAAAB///4B////////wAAAAAAAAAAAAP///wD///////+AAA AAAAAAAAAA////AH///////8AAAAAAAAAAAAD///+AP///////wAAAAAAAAAAAAH///4EP////// /AAAAAAAAAAAAAP///gQ///////8AAAAAAAAAAAAB////AD///////wAAAAAAAAAAAAP///8Af// /////AAAAAAAAAAAAA////wAf//////8AAAAAAAAAAAADv///AAD//////wAAAAAAAAAAAAH///8 AAH//////AAAAAAAAAAAAAP///wAAH/////8AAAAAAAAAAAAA/9//gAAf/////wAAAAAAAAAAAAf /nf/AAA//////AAAAAAAAAAAAA//A/+AAAf////8AAAAAAAAAAAAB/8Bf4AAB/////wAAAAAAAAA AAAAfgB/wAAP/////AAAAAAAAAAAAAAfAD/4AH/////8AAAAAAAAAAAAAAAAP/AAf/////wAAAAA AAAAAAAAAIB/8AB//////AAAAAAAAAAAAAAA8HHgAH/////8AAAAAAAAAAAAAeD8AYAAP/////wA AAAAAAAAAAAB//wDgAAf////3AAAAAAAAAAAAAH/8AAAAB////+MAAAAAAAAAAAAEf/gBAAA/wH/ /5wAAAAAAAAAAAAD/8AIAADzxP//HAAAAAAAAAAAAAP/wAgAAOGA//+cAAAAAAAAAAAAA//AAAAA wAD///wAAAAAAAAAAAAD/+AAAAAAA////AAAAAAAAAAAAAP/4AAAAAAH///8AAAAAAAAAAAAB//w AAAAAA//7jwAAAAAAAAAAAAP//AAAAAAH//mHAAAAAAAAAAAAA//8AAAAAAf/3MEAAAAAAAAAAAA D//wAAAAAB//hwAAAAAAAAAAAAQP//AAAAACH/zAAAAAAAAAAAAABg//4AAAAAYf/MAAAAAAAAAA AAAGD//AAAAA/h//gAAAAAAAAAAAAAeP/8AAAAD+HwcAAAAAAAAAAAAAB///wAAAAP8fAAAAAAAA AAAAAAAH///wAHAD934AAAwAAAAAAAAAAAf///wAcAPzfgAADAAAAAAAAAAAg//++AGdF+P8AAAA AAAAAAAAAAAD///8AQ2/4/wAMAAAAAAAAAAAAAO///wB///n/AAwBAAAAAAAAAAAMP///gH+T8+M ACAMAAAAAAAAAAAA///+AfxPj+gAIAwAAAAAAAAAAAB///4B//yf3ACAHAAAAAAAAAAAAH///gH/ /J38AIN8AAAAAAAAAAAA////wP/yGfwAg/wAAAAAAAAAAER///7w///O44TwfAAAAAAAAAAAAP// /1z/+Y7jhuB8AAAAAAAAAAAB///////xz+CD4PwAAAAAAAAAAAH////v//H/4AGj/AAAAAAAAAAA Af//////+d9wMA/8AAAAAAAAAAAD///////8w3wQ//wAAAAAAAAAAAP////////D7gD//AAAAA/g AAAAB////////8PGAf/wAAAAD+gAAAA3////////xGCBH+QAAAAO/AAAAD/////////A/wCf8AAA AAd4AAAAP////////8H/fvPwAAAAAwAAAAT/////////+f9/9/QAAAAAAAAABn/////////7/n// /AAAAAAA4AAOH/////////v/f//cAAAAAADgAAAf//f///////////wAAAAAAAAAAIf/9//////n ///9/AAAAAAAEcAIJ////////8f//P/8AAAAABwfwJ1P///////////3//wAAAABfB/AGA////// //////b//AAAAA== ------=_NextPart_000_0038_01C97C7A.5EBA6CE0-- /*****************************Eml File Content******************/
|
|
|
|
 |
|
 |
I've just download the demo samples & got infected by a spyware. All my mails are infected by the MIME Header Buffer Overflow virus
|
|
|
|
 |
|
 |
hi guys how to avoid this
any solution ???????? please let me know
|
|
|
|
 |
|
 |
I've tried to implement mr. Duke's software in a web-page using javascript, but have come across a couple small problems - probably due to my lack of knowledge - anyway, it's probably just a minor adjustment that's necessary. Can anyone please have a look?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<script type="text/javascript" language="JavaScript">
function decode(){
var x;
var Dec = new ActiveXObject("MimeSniffer.Decoder");
// -- IPersistStream::Load the content
x=Dec.LoadFromFile("mail2.txt");
// -- throw the subject
alert("Subject is: " + Dec.Subject);
// -- modify the subject
Dec.Subject = "Extended " + Dec.Subject;
// -- get root body object...
var Body = Dec.Body;
// -- get the text part, wich is the first part
var TextBody = Body(0); // Body[0] ??? - doesn't work either.
// -- throw the content
Alert("Body-Text is: " + TextBody.Value);
// -- modify the text part
TextBody.Value = TextBody.Value + String.fromCharCode(13) + String.fromCharCode(10) + "Nice, isn't it?";
// -- get the pic part, wich is the second part
x = PicBody = Body(1); Body[1] ???
// -- extract the content to a stream
x = PicBody.ExportAsFile("copy of " + PicBody.FileName);
// -- "Send" the modified email to a stream
x = Dec.SaveToFile("mail3.txt");
alert("x : " + x);
}
function encode(){
var x;
var Dec = new ActiveXObject("MimeSniffer.Decoder");
// -- supply head information
Dec.From = "me@home.com";
Dec.To = "friend@server.com";
Dec.Subject = "Test";
// -- get root body object...
Body = Dec.Body;
// -- ...wich will consist of multiple parts
Body.MajorContentType = "multipart";
Body.MinorContentType = "mixed";
// -- insert a new body object
TextBody = Body.AddNew();
// -- set header information for this part
TextBody.MajorContentType = "text";
TextBody.MinorContentType = "plain";
TextBody.Encoding = "quoted-printable";
// -- set the content
TextBody.Value = "This is the text part!";
// -- insert a new body object
PicBody = Body.AddNew();
// -- set header information for this part
PicBody.MajorContentType = "image";
PicBody.MinorContentType = "jpg";
PicBody.Encoding = "Base64";
// -- import the content
x = PicBody.ImportFromFile("duke.jpg", 1);
// -- declare the second part as an attachment
PicBody.FileName = "duke.jpg";
// -- "Send" the email to a stream
x = Dec.SaveToFile("mail2.txt");
alert("x : " + x);
}
</script>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<button önClick="encode();">encode</button>
<button önClick="decode();">decode</button>
</body>
</html>
The first problem is that when I run the encode function, it places the mail2.txt file on my desktop.
The second problem is that it is unable to load the Body array when I run the decode class, and hence I get an undefined error.
Thanks for any help!
Brgds
Iver Erling Arva, Oslo, Norway
iver@tda.no
|
|
|
|
 |
|
 |
I have been looking for an open source MIME email message decoder for the last two weeks. I can now complete my ASP webmail client. I wanted to thank whoever wrote this code and desided to put up the source code rather than charge a rediculous amount of money for a compiled version.
Thanks again.
LONG LIVE OPEN SOURCE!!!!
|
|
|
|
 |
|
 |
i'm trying to build MimeSniffer on vs 2005
on the line
CollType::iterator m_iter; (comcollection.h)
i get the following errors
-- error C2146: syntax error : missing ';' before identifier 'm_iter'
-- error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
on the line
body.erase(&body[Index]); (mimebody.cpp)
i get the following error
-- error C2664: 'std::_Vector_iterator<_Ty,_Alloc> std::vector<_Ty>::erase(std::_Vector_iterator<_Ty,_Alloc>)' : cannot convert parameter 1 from 'CYYSType *' to 'std::_Vector_iterator<_Ty,_Alloc>'
how do i eliminate this errors, please?
|
|
|
|
 |
|
 |
I am using VS 2003 instead of VS 2005, but did get the error comcollection.h on the line that reads:
CollType::iterator m_iter;
This problem can be resolved by prefixing the line as follows:
typename CollType::iterator m_iter;
I had one of those duh moments when I finally realized that the compiler was telling me how to fix it.
|
|
|
|
 |
|
 |
Hi, its wonderful to get HTML out of MIME buffer. I am able to get HTML out of almost all of my MIME buffer but it is failing for some cases. Here is the MIME buffer where it crashing when I try to use get body from it.I anaysed that it always crash if HTML body starts with <DIV> or <P> tag. Content-Transfer-Encoding: binary Content-Type: text/html; charset=ISO-8859-1 <div><STRONG><FONT color=#ff9900>RTF NOT NULL Without attachment Title-099</FONT></STRONG></div>
code: // hTempFile it contains handle of My MIME buffer file CFileSystemStream SourceStream(hTempFile); IMimeDecoderPtr Decoder; IPersistStreamPtr pPersist; Decoder->QueryInterface(&pPersist); pPersist->Load(&SourceStream); IMimeBodyPtr Body; Body = Decoder->Body; -----------------------------------> it crashes here even I tried to put try catch block it never catch.
Mentioned MIME buffer comes from Quick Place. Quick Place is able to convert these MIME buffer into HTML correctly. Is there any validation check for MIME buffer for MIMEsniffer.dll? How to validate the MIME buffer. I tried to put <HTML> </HTML> and <BODY> </BODY> tag to my MIME buffer and passed it to MIMEsniffer.DLL even it gets crashed. could you help me out ? Thanks in advance. Chandan Kumar VIT infotech
|
|
|
|
 |
|
 |
I've recently conqueured the challenge of passing Strings via a MemoryStream to MimeSniffer using MimeSniffer.Load(stream) and exporting attachments to streams using MimeBody.Export(stream).
Because its a common requirement in avoiding the use of temporary files, I've written an article showing how to do it with the code I developed.
IMemoryStream
TJ
|
|
|
|
 |
|
 |
After adding a .txt attachment to a mime-encoded message, the text of the attachment is included in the message (not as an attachment), and the original text of the message is not visible.
I've looked at the mime headers and the only difference I can see is that when sending with MS Outlook the following tag is included:
Content-Disposition: attachment;
This tag is not written when adding with MimeSniffer.. Could this be the problem?
Thanks!
|
|
|
|
 |
|
 |
This is regarding the issue "Cannot get text part of multi part body" in mimesniffer for decoding eml file with attachment.
We are also facing the same issue in our project.
We request you if you have any solution for this, please forward it to me at sandeepkgsmarty@gmail.com
It would help us to solve it in our project as well.
Thanks
sandeep gupta.
|
|
|
|
 |
|
 |
I'm having some trouble usign anything other than Base 64 Encoding and was wondering if anyone was keeping this going.
-Kris
|
|
|
|
 |
|
 |
Hi,
First of all i find that you're component is really great. I'd like to integrate it in a small piece of software for the firm I am working for and therefore i'd like to know if an enterprise licence is available where I can get it and how much would it cost? Thanks by advance
bobmorton
|
|
|
|
 |
|
 |
Hi at all,
I try to decode the following Mailheaders:
Return-Path: {c.bendt@*******.de}
Delivered-To: web6p18@webbox113.***********.net
Received: from n041.***.**.net (h14.***.**.net [***.***.**.**])
by webbox113.***********.net (Postfix) with ESMTP id D33551C155
for {inkosys@***********.de}; Tue, 22 Jun 2004 21:54:32 +0200 (CEST)
Received: from localhost (**.***.**.***) by n041.***.**.net (7.0.027.3-1) (authenticated as c.bendt)
id 40C8C7660003CE02 for inkosys@***********.de; Tue, 22 Jun 2004 19:58:15 +0000
Message-ID: {40C8C7660003CE02@n041.***.**.net} (added by postmaster@*************.net)
From: "C. Bendt [Mobil]" {c.bendt@*******.de}
Date: Tue, 22 Jun 2004 21:58:34 +0100 (MET)
Subject: [t]Umlaute:=?iso-8859-1?B?IMQt5C3WLfYt3C38Ld8=?=
To: inkosys@***********.de
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; CHARSET=iso-8859-1
Content-Transfer-Encoding: QUOTED-PRINTABLE
X-UIDL: $=l"!DDW!!PLl!!:9X"!
HTML-Tags in the header lines are replaced with { and }.
To do this I use the following VB-Script (WSH):
Set MimeDecode = CreateObject("MimeSniffer.Decoder")
MimeDecode.LoadFromFile "MSG1.TXT"
MsgBox "Subject is: " & MimeDecode.Subject
Set MimeDecode = Nothing
When I run this Script, the process wscript.exe gets 100% CPU Load and the VB-Script do not end.
Has someone any ideas or hints to help me with this Problem?
Many thanks,
Christian.
|
|
|
|
 |
|
 |
This happens with me too and nothing happens. It only happens when tring to decode a MIME message though. It's fine if it's not mime encoded
|
|
|
|
 |
|
 |
i am using it to decode attachments from MIME email files
I am using VB 6.0 and enterprise edition
Set Dec = CreateObject("MimeSniffer.Decoder")
Dec.LoadFromFile strIn
Set Body = Dec.Body
For i = 0 To Body.Count - 1
Set BodySub = Body(i)
If BodySub.FileName <> "" Then
BodySub.ExportAsFile BodySub.FileName
'Add this to list box
EA.AddItem BodySub.FileName
End If
Set BodySub = Nothing
Next
this code, its compiled EXE works fine on my m/c, but when i take it to my friend's PC it crib's giving Type Mismatch error
i think it is probably in Set Body=Dec.Body
i am out of options here
Please help
|
|
|
|
 |
|
 |
hi it's me again
sad that no relplies from auth ot users, but any way
i think the error was due to the file format
The emails send from Outlook Express were decoded perfectly but those sent from MS OutLook cribbed.
dont' know why though
|
|
|
|
 |
|
 |
I receive the mail which create with this code , I save it as a eml file. And then I decode the eml file , but decode failed . I use outlook import the eml file , outlook can decode successfull .I don't know what's wrong with it . Is there anybody got a same error?
please give me a help
|
|
|
|
 |
|
 |
Hi,
Excellent piece of work. Still testing all the different messages.
Do you plan to add support for UUE attachements?
Thanks
Andrew
|
|
|
|
 |
|
 |
Can somebody write a flex program that recognizes a password,which has at least one capital letter ,at least one lowercase letter an at least one number
|
|
|
|
 |
|
 |
I have a Body object that has a count of 2. So I would assume that Body(0) and Body(1) would be valid. But if I try to access Body(1) then I get a Invalid procedure call or argument error.
Why did you not choose to make Body a collection? What is it? It seems to be something between a single object and a collection.
|
|
|
|
 |
|
 |
What a great product! I can't believe you are offering this for free. It is obvious it took a lot of hard work. Ignore those who feel you have not done enough. You have gone above and beyond IMHO.
Just a few of questions.
I am creating my own ATL control for mail. I am going to recommend that the users of my control make use of your control. I see that the Load method can take a object called stream. Reading above, this seems to be an IPersistStream object? Can it also be a IStream object? How do I implement that in Visual Basic?
I don't see methods for handeling attachemnts? Are you handling attachments in the control?
|
|
|
|
 |