Roundcube Community Forum

 

Retrieve and set Email Header

Started by pratik_1712, January 20, 2011, 03:55:55 AM

Previous topic - Next topic

pratik_1712

I want to add additional headers to the sent emails and also to retrieve the same in the received ones..

How can this be implemented..??

Are there plugins available which does this already..??
If Not..
Guide me to appropriate resource..
Any help will be highly appreciated..

Thanks and Regards,
Pratik

Julius Caesar

Have you tried installing the plugin 'show_additional_headers' ?
Julius Caesar

You can download the Groupvice4 theme here.
Sie können Groupvice4 hier he

pratik_1712

Quote from: Julius Caesar;32593Have you tried installing the plugin 'show_additional_headers' ?

@julius: I am familiar with the plugin.. Thanks anyway i went through it again.. was helpful..

What i am looking for is to retrieve a particular header and displaying it in the list of the mails, along with the sender name, subject, date, etc..

show_additional_headers retrieve them in the show or preview pane for a message at a time.. I need it to be in the main list and for all the message..

I am not sure do i have to make an ajax call.. or some other method..?? Any help is welcome..

Thanks and Regards,
Pratik

pratik_1712

i think i have to use this hook "mailboxes_list".. not sure though.. but if any plugin do use the same.. redirect me..???
Any other opinion..???

rosali

Look into my calendar plugin.

Search for 'x-rc-attachment'.

To retrieve the additonal headers 'message_list' hook is the right hook.

To show additional columns in the message list you may want to look into
'chbox' plugin.
Regards,
Rosali

pratik_1712

I used 'chbox' plugin to learn about adding column sometimes back.. That is working fine..
I added few more functionalities to it as per need..
But the problem is to fetch a header('Reputation' already present in the mails) from all the mails and to display it in the column..
Any Help or Recommendation is Welcome..

rosali

As mentioned check my calendar plugin hook 'messages_list'

In my case the IMAP server receives:

"IMAPD"   2156   272   "2011-01-24 09:24:28.078"   "127.0.0.1"   "RECEIVED: A0007 FETCH 62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101 (UID RFC822.SIZE FLAGS INTERNALDATE BODY.PEEK[HEADER.FIELDS (DATE FROM TO SUBJECT CONTENT-TYPE LIST-POST DISPOSITION-NOTIFICATION-TO USER-AGENT X-RC-ATTACHMENT USER-AGENT X-RC-ATTACHMENT LIST-HELP LIST-SUBSCRIBE LIST-UNSUBSCRIBE LIST-POST LIST-OWNER LIST-ARCHIVE)])"

... X-RC-ATTACHMENT ...

and returns that header!



in init section:

$this->add_hook('messages_list', array($this, 'pass_ics_header'));

associated method:

  function pass_ics_header($p){
    if(is_array($p['messages'])){
      foreach($p['messages'] as $message){  
        if($message->others['x-rc-attachment']){
          $message->list_flags['extra_flags']['ics'] = 1;
        }
      }
    }
    return $p;
  }
Regards,
Rosali

pratik_1712

Do i have to make any changes in CSS for this..??
Its not displaying the flag..

pratik_1712

The 'ics' is used for what purpose..??
I am unable to comprehend the whole calendar plugin..
Any other plugin which uses the similar way for displaying header values at a go in the main page..??

Thanks and Regards,
Pratik

pratik_1712

Got it working.. Was doing something wrong with the variables..
Thanks for all the help..
It was very helpful..

Regards,
Pratik

parkduyanh

Have you tried installing the plugin 'show_additional_headers' ?