Index: Mail.cs =================================================================== --- Mail.cs (revision 70) +++ Mail.cs (working copy) @@ -20,8 +20,8 @@ protected DateTime sentDate; protected DateTime receivedDate; - protected string header; - protected string body; + protected byte[] header; + protected byte[] body; protected Hashtable headerFields;//this property will be created every time from the header @@ -54,9 +54,9 @@ public DateTime ReceivedDate { get { return receivedDate; } } - public string Header + public byte[] Header { get { return header; } } - public string Body + public byte[] Body { get { return body; } } public Hashtable HeaderFields @@ -79,12 +79,13 @@ * There's nothing protocol specific there (except respecting RFC822) * - Filip, 8/12/2005 */ - public Mail(System.IO.StreamReader streamReader) + public Mail(System.IO.BinaryReader binaryReader, int size) { - string Buffer = "", Line; + byte[] Buffer; header = body = null; +/* for (;;) { Line = streamReader.ReadLine(); @@ -92,6 +93,9 @@ break; Buffer += Line + "\r\n"; } +*/ + Buffer = new byte[size]; + binaryReader.Read(Buffer, 0, size); //mich change 17.1.2006 headerFields = new Hashtable(); Index: POP3Connector.cs =================================================================== --- POP3Connector.cs (revision 70) +++ POP3Connector.cs (working copy) @@ -123,7 +123,10 @@ Line = RdStream.ReadLine(); if (Line[0] != '+') throw new System.ApplicationException("POP3 RETR failed"); - Mail = new Mail(RdStream); + Mail = new Mail(new BinaryReader(NetStream), MessageSizes[Id]); + Line = RdStream.ReadLine(); + if (Line[0] != '.') + throw new System.ApplicationException("POP3 message reading failed"); accountManager.PutMessageIntoInbox(account, Mail); /* FIXME: New mail notification */ /* accountManager.NewMessage(account, Mail); */ Index: IMessage.cs =================================================================== --- IMessage.cs (revision 70) +++ IMessage.cs (working copy) @@ -15,8 +15,8 @@ {get;} string To {get;}*/ - string Header + byte[] Header {get;} - string Body + byte[] Body {get;} }