 |
|
 |
Hi Ivar,
First, I'm so grateful to you for sharing your great work with all of us, this is just incredible! Its's exactly what I was looking for (actually, it's much more than that), and for beginners like me who are eager to learn, it's a great tool to understand certain things, and also an astonishing time saving: there are so much things I won't have to find out myself how to do them thanks to your class library. Many many thanks, Ivar, really.
I found your imap_client_app among the downloadable examples available on your website. I wanted to make a step by step debugging to see how you do it, so I downloaded the latest version of your Lumisoft.Net class library and then imported all the needed classes in the imap_client_app. But I encountered a few problems: there are some differences between the Lumisoft.Net DLL used in your imap_client_app dating from Nov 5 and the latest version of the Lumisoft.Net class library dating from Oct 5 (there are especially class or method naming differences), so I tried to adapt the corresponding names, but once I did that, some bugs occured (with date format or other things), which do not occur when running imap_client_app with the DLL you used with this application.
So, if you could make the Lumisoft.Net class library project corresponding to the DLL you used with imap_client_app available for download, this would very much help me and would be great!
Thanks very much for all,
Michaël
|
|
|
|
 |
|
 |
Hi,
Latest code is in SVN (url in readme.txt).
www zip file updated only if no pending changes, otherwise code may contain currupt classes.
|
|
|
|
 |
|
 |
Cool, I found everything I needed, thanks a lot!
Cheers
Michaël
|
|
|
|
 |
|
 |
I am parsing the raw message content that an email processing program wrote into a database column. The message starts with:
This is a multi-part message in MIME format. --_----------=_125643366138564143 Content-Disposition: inline Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0
When I try to parse using Mime.Parse, I get an InvalidFieldNameException in HeaderField.Name's setter. The value is "--_----------=_125643366138564143 Content-Disposition:".
Is there something wrong with the message I am processing? Am I using the library wrong?
Thanks!
Eric
|
|
|
|
 |
|
|
 |
|
 |
After removing everything up to the first thing that looks like a correct header ("Content-Disposition: inline ..."), the email parses without throwing an Exception. However, there are no useful results in the Mime object returned by Mime.Parse.
BodyHtml and BodyText are both null.
MainEntry.Data and MainEntry.DataEncoded contain zero bytes (0x00).
Date is 1/1/0001.
MessageID, MimeVersion, ReplyTo, Sender, Subject, To are all null.
HeaderString contains the entire input message, including encoding like "= ", except that some CR LF have been inserted.
Header.Name = "Content-Disposition:";
Header.Value starts "inline Content-Transfer-Encoding: 7bit Content-Type: message/rfc822 >From My SenderName Oct 12...."
Somehow Content-Transfer-Encoding is not being recognized as a new header.
I'm sure it's something I'm doing wrong, or something that's happening to the email before it reaches me, but I'm lost as to what. By the way, I'm processing feedback loop messages from Yahoo and AOL... so I guess they create properly formatted emails.
modified on Sunday, October 25, 2009 3:47 PM
|
|
|
|
 |
|
 |
Probably you have some problems with CRLF in message.
Also i see you use very old version, you should try latest:
http://www.lumisoft.ee/lswww/download/downloads
|
|
|
|
 |
|
 |
Sir,
I like to implement a mailserver application using .Net with C# as part of my accademic project.I downloaded your mail server source code. But some of the concepts are not clear to me.Please give me a guide line to develop a mail server. i know Its not a simple task.But i can if you are help me. I am going to the end of MCA.I have knowledge in C# & ASP.My mail id is vibince@yahoo.co.in.
I am expecting for your reply.
Thanks in advance......
|
|
|
|
 |
|
 |
dear ivar,
in the first place thankyou for your great sourcecode
one thing i can't manage is to save the attacchment out of a message.
for example what do i wrong here to get a bytearray:
byte[] emldata = ...
Mail_Message mail = Mail_Message.ParseFromByte(emldata);
MIME_Entity miment = new MIME_Entity();
if (mail.Attachments != null)
{
for (int j = 0; j < mail.Attachments.Count(); j++)
{
MIME_b_Application attachm = new MIME_b_Application(mail.Attachments[j].Body.MediaType);
byte[] buffer = ???
}
}
many thanks in advance
|
|
|
|
 |
|
 |
Hi,
Tehre are:
.Data property
Or for large data
GetDataStream() method
|
|
|
|
 |
|
 |
Hi Thanks for this component.
Great work..
There is some problem to save attachment from eml; when there is an .eml file itself as attachment in an eml file.
|
|
|
|
 |
|
 |
Ehe "There is some problem", it sound like huston we have problem, what it the problem ?
|
|
|
|
 |
|
 |
Sorry for not providing detail.
Problem was when there was attachment type of eml.
it was returning no byte array from that attachment.
And also it was not taking some other files in that attachment.
But As I said the latest version is working fine.
Any way Good work. It's one among the top post I found in Code project.
|
|
|
|
 |
|
 |
I used the latest version it's working with eml within eml.
Thanks..
|
|
|
|
 |
|
 |
Hi Ivar!
I have a little problem...I was trying to parse an incoming POP3 e-mail:
POP3_ClientMessage PopMessage = Pop.Messages [i];
Mail_Message MailMessage = Mail_Message.ParseFromByte (PopMessage.MessageToByte ());
My problem is that the mail server used doesn't comply to RFC 2822 to format date-time field, it is "Date: 30 Sep 2009 17:46:22" instead of "Date: 30 Sep 2009 17:46:22 +0200", so your parser throws a ParseException...is there a way to avoid parsing of the time zone field? Without recompiling your library and without making a workaround modifying the "Date: " field and adding the field...
By the way, you made a great work with this library, it is very useful!!!
|
|
|
|
 |
|
 |
Hi,
I tested, it is parsed, are you shoure that you latest version.
Pop3 example app may have older net.dll ... .
|
|
|
|
 |
|
 |
I downloaded the DLL from this URL:
http://www.lumisoft.ee/lswww/download/downloads/Net/LumiSoft.Net.zip
so I think this is the latest version.
My problem is that your library parses the "+0200" field (according to RFC 2822), but my mail server doesn't send it, so the date field is incomplete and when I try to parse the message, a ParseException is thrown on the Date field.
Is there a way to set a "no RFC 2822 compliance" flag, so when parsing date the "+0200" field is ignored?
I know this is and odd request, but I wouldn't like to rebuild your library (it works perfectly as is), so if there is another solution, it is welcome!
Thanks again
EDIT:
I think parsing fails here (MIME_Utils.cs):
// We have optional "second".
if(r.Peek(true) == ':'){
r.Char(true);
second = Convert.ToInt32(r.Atom());
}
int timeZoneMinutes = 0;
v = r.Atom(); <<<<<<<<< HERE
// We have RFC 2822 date. For example: +2000.
if(v[0] == '+' || v[0] == '-'){
...
Atom function returns null because after seconds there is "\r\n" instead of "+0200" (or RFC 822 GMT field), so the "v[0] ==" instruction throws a null pointer exception.
modified on Friday, October 2, 2009 5:29 AM
|
|
|
|
 |
|
 |
The new version will be up at next week, i have some IMAP related pending stuff - so can't put current as live.
If you need it faster - i can only email newer binary.
|
|
|
|
 |
|
 |
No thanks, no need to mail me new binaries. I'll wait for the new release! Thanks a lot!!
|
|
|
|
 |
|
 |
hi ivar and thanks for this great library.
i looked around but could not find a parsing a mime file examples with the new library.
providing some parsing examples will be apreciated.
thank you very much.
- ilker
|
|
|
|
 |
|
|
 |
|
 |
I had a friend contact me with some MIME email logs he needed parsed and converted to CSV and this worked great so thanks! The only change I made was to change HeaderFieldCollection -> IEnumerable<HeaderField> so I could use LINQ to query the data like this:
var ip = from x in m.MainEntity.Header
where x.Name.Equals("X-Originating-IP:")
select x;
|
|
|
|
 |
|
|
 |
|
 |
Im working in an application that cames from an Outlook.MailItem, I receive an email with a eml file attached, and inside that, another eml attached with documents inside. I Tryed to do it recurivelly using the MIME.Parser and Attachmments, but when reading an attachment of type "eml", it seems not all the information is on it.
Any Idea?
Regards, broxcj
|
|
|
|
 |
|
 |
Latest parses message/rfc822 out of box. In older version yep you needed to call MIME.Parser .
|
|
|
|
 |