Author Topic: Can't download multipart message body to database??????  (Read 4739 times)

Offline paritycheck

  • Jr. Member
  • **
  • Posts: 36
Can't download multipart message body to database??????
« on: September 29, 2007, 07:13:58 AM »
Hi guys I need some help right here.. I'm tweaking roundcube mail so that at the click on a button a selected message is copied from the mail server into a table on my local database. SO far I've made a couple of tweaks so that it takes a copy of the mail headers from the mail server and it copies teh headers .. but I can't find the way to copy the message body and attachments and message parts as well to the database.

Which function is used to retrieve the message body and attachment information from the mail server? Right now what my patch does is that when the message is selected and my custom button clicked - it first takes a copy of the mail header with the code :

$headers = $this->get_headers($one_uid, $key);

And then I make it insert into the database with own custom function. I've made my own little tweaks to retrieve the message headers from the database as well.

But I'm not so sure about how to retrieve the message body part and what should I do with messages that are mimetype or have multiparts. Currently the following code just returns raw basic text and doens't work for multipart emails.

$headers->structure = &$this->get_body($one_uid);

What do I need to do to also download attachments and put the attachments in the database as well as download the whole mail structure?

Any help would be greatly appreciated...