getting text from an email

  • Casey Harris

    Casey Harris - 2011-06-13

    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?


            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);


            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);

  • Casey Harris

    Casey Harris - 2011-06-15

    Please close as I had placed the message in the wrong forum.



Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks