Roundcube Community Forum

 

rcmail storage object structure difference

Started by aizul, April 07, 2015, 02:30:17 AM

Previous topic - Next topic

aizul

Hello everyone,

I used this to get the content of a message:


$rcmail->storage->icache['message']->structure->body;


The problem is if the message contains attachments, the structure is different and there is no body. I can't find the content of the message anywhere in the object of the message. Is there a better way to get the message content?

Thanks

alec


aizul

Thanks alec.

I managed to solved my problem.



$rcmail = rcmail::get_instance();
$msg_uid = $rcmail->storage->msg_uid;

$message = new rcube_message($msg_uid);

// use $message->first_text_part();
// or $message->first_html_part();