public bool GetRawEmail(int MessageNo, out string EmailText) { //send 'RETR int' command to server if (!SendRetrCommand(MessageNo)) { EmailText = null; return false; } //get the lines string response; int LineCounter = 0; //empty StringBuilder if (RawEmailSB==null) { RawEmailSB = new StringBuilder(100000); } else { RawEmailSB.Length = 0; } isTraceRawEmail = true; while (readMultiLine(out response)) { LineCounter += 1; } EmailText = RawEmailSB.ToString(); m_spop3Message = new SharpMessage(EmailText); mailattachments = new SharpAttachment[m_spop3Message.Attachments.Count]; m_spop3Message.Attachments.CopyTo(mailattachments, 0); TraceFrom("email with {0} lines, {1} chars received", LineCounter.ToString(), EmailText.Length); return true; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)