Re: [Evolution-hackers] Help request: Mime v1.0 from char* to CamelMimeMessage*

This is some extra information on my previous message.
- Help request: Mime v1.0 from char* to CamelMimeMessage*

I've tried the following code to put the char* (containing the message) in a 
stream. And then convert it to a message. But this dousnot work this way I 
guess what am I doing wrong?

CamelStream *stream = NULL;
 CamelDataWrapper *dw = NULL;
 CamelMimeParser *parser = NULL;
// CamelContentType *ct = NULL;
  int errwrap = 0;
//if(IMToINet(pMapiMessage, &szMessage) == hrSuccess){
    if(IMToINet(pMapiMessage, &szMessage) != hrSuccess){
        printf("Message:\n  %s\n", szMessage);

        stream = camel_stream_mem_new();
        camel_stream_write(stream, szMessage, strlen(szMessage));
        msg = camel_mime_message_new ();

          if(-1 == 
camel_data_wrapper_construct_from_stream((CamelDataWrapper*) msg,stream)){
          printf("Hello World Data Wrapper");
//          stream = camel_stream_mem_new_with_buffer((const char*)szMessage, 
//          errwrap = camel_data_wrapper_construct_from_stream(dw,stream);

          printf ("Error Wrap = \n");
//          printf("mime_type = %s\n", camel_data_wrapper_get_mime_type(dw));

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]