+ std::string bodypart=(char *)(*i)->GetContent();\r
+#ifdef DO_CHARSET_CONVERSION\r
+ std::string charset=(*i)->GetCharset();\r
+ if(charset!="" && charset!="UTF-8")\r
+ {\r
+ CharsetConverter ccv;\r
+ if(ccv.SetConversion(charset,"UTF-8"))\r
+ {\r
+ std::string output="";\r
+ ccv.Convert(bodypart,output);\r
+ bodypart=output;\r
+ }\r
+ }\r
+#endif\r
+ m_body+=bodypart;\r
+ }\r
+ // add a binary file attachment\r
+ else if((*i)->GetName()!="" && (*i)->GetLength()>0 && (*i)->GetContent())\r
+ {\r
+ std::vector<unsigned char> data((*i)->GetContent(),(*i)->GetContent()+(*i)->GetContentLength());\r
+ m_fileattachments.push_back(fileattachment((*i)->GetName(),data));\r