Dump text

MMS library for .NET

Moderator: alt

Post Reply
Posts: 30
Joined: Wed May 02, 2007 7:41 pm

Dump text

Post by stevep » Tue Mar 19, 2013 8:51 am

Hi Alt,

MM7 server works well, I have a quick question.

If I receive a text file as an MMS part, is there a convenient way to read the text out of the file from the part.Data byte[] rather than saving the file and then reading in the content?

I could save the part, read in the text and then delete the temporary file but it might be more efficient to read it from the stream.

Site Admin
Posts: 988
Joined: Tue Apr 25, 2006 9:45 am

Re: Dump text

Post by alt » Wed Mar 20, 2013 5:49 pm

Hi Steve,

You can try
string text = Encoding.UTF8.GetString(part.Data);
Post Reply