char test_out;
strcpy( test_out, attDataOut.c_str());
print_err( __FILE__, __LINE__, "----------- THE BODY OF THE EMAIL IS ------------- \n");
print_err( __FILE__, __LINE__, test_out);
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello all,
I have the following code listed below. I am trying to get the information in the body of an email (which is sent in a text-like format).
Can someone point me in the right direction as to how I can do this?
TIA
bdy = parsedMsg->getBody();
string FromEmail(hdr->From()->getValue()->generate());
string ToEmail(hdr->To()->getValue()->generate());
string PrintDate (hdr->Date()->getValue()->generate());
string PrintSubject (hdr->Subject()->getValue()->generate());
vmime::ref <const vmime::contentHandler> attCth = bdy->getContents();
vmime::string attDataOut;
vmime::utility::outputStreamStringAdapter attDataOutOs(attDataOut);
attCth->extract(attDataOutOs);
char test_out;
strcpy( test_out, attDataOut.c_str());
print_err( __FILE__, __LINE__, "----------- THE BODY OF THE EMAIL IS ------------- \n");
print_err( __FILE__, __LINE__, test_out);
Please close as I had placed the message in the wrong forum.
TIA