cpSphere Email component

I had been using this excellent component (developed by Kamran M. Qamar) to download messages from POP3 server. It works well but It has a small bug in the method SaveAs of the Attachment class: The files are saved empty. This is the improvement:

public void SaveAs(string path, string fileName)
{
string FullName = path + “\\” + fileName;
FileStream file = new FileStream(FullName, FileMode.Create, FileAccess.ReadWrite);
byte[] buffer = ((MemoryStream)_part.BodyStream).ToArray( );
file.Write( buffer, 0, buffer.Length);
file.Close();
}

About Rodolfo Finochietti

Uma's and Gino's father, and a programmer ;)

Posted on 04/06/2005, in .NET. Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: