This project is read-only.

serialization problem and a cental web service


When I try to serialize a mailmesage with an image attached, and then send all emails using gopi methods, the attached image can not be shown in the received email ( alhough it exists in the resulting xml and in the received email, could there be a corruption while serialization? ) .
Also, is it possible to use these libraries with a Web service? It would be great to publish these classes and methods with a web service and let all clients use this service without any dll reference.
Thanks for your support


lustre_ wrote May 8, 2008 at 9:44 AM


this issue is not limited to image files.

I also tried a text file. It was also corrupted

PankajSingh wrote Feb 26, 2011 at 11:43 AM

@all. The problem occurs because for serialization it is converted into a base64 string but the same is not done on deserialization. To correct this problem replace the line 163 in SerializableMailMessage.cs with

byte[] data = Convert.FromBase64String(node.InnerText); which decodes into the proper format.

wrote Feb 2, 2013 at 4:54 AM