Author Topic: Retrieve and set Email Header  (Read 7275 times)

Offline pratik_1712

  • Jr. Member
  • **
  • Posts: 43
Retrieve and set Email Header
« on: January 20, 2011, 03:55:55 AM »
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

Offline Julius Caesar

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 498
    • http://www.de-keizer.net/
Retrieve and set Email Header
« Reply #1 on: January 20, 2011, 05:03:29 AM »
Have you tried installing the plugin 'show_additional_headers' ?
Julius Caesar

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

Offline pratik_1712

  • Jr. Member
  • **
  • Posts: 43
Retrieve and set Email Header
« Reply #2 on: January 22, 2011, 07:40:01 AM »
Quote from: Julius Caesar;32593
Have 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

Offline pratik_1712

  • Jr. Member
  • **
  • Posts: 43
Retrieve and set Email Header
« Reply #3 on: January 22, 2011, 07:48:43 AM »
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..???

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Retrieve and set Email Header
« Reply #4 on: January 24, 2011, 03:48:02 AM »
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
__________________
MyRoundcube Project (commercial)

Offline pratik_1712

  • Jr. Member
  • **
  • Posts: 43
Retrieve and set Email Header
« Reply #5 on: January 24, 2011, 06:30:38 AM »
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..

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Retrieve and set Email Header
« Reply #6 on: January 24, 2011, 06:49:51 AM »
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!

Code: [Select]


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
__________________
MyRoundcube Project (commercial)

Offline pratik_1712

  • Jr. Member
  • **
  • Posts: 43
Retrieve and set Email Header
« Reply #7 on: January 31, 2011, 04:08:27 AM »
Do i have to make any changes in CSS for this..??
Its not displaying the flag..

Offline pratik_1712

  • Jr. Member
  • **
  • Posts: 43
Retrieve and set Email Header
« Reply #8 on: February 01, 2011, 01:00:41 AM »
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

Offline pratik_1712

  • Jr. Member
  • **
  • Posts: 43
Retrieve and set Email Header
« Reply #9 on: February 01, 2011, 04:12:09 AM »
Got it working.. Was doing something wrong with the variables..
Thanks for all the help..
It was very helpful..

Regards,
Pratik

Offline parkduyanh

  • Newbie
  • *
  • Posts: 7
Retrieve and set Email Header
« Reply #10 on: July 13, 2011, 11:26:38 AM »
Have you tried installing the plugin 'show_additional_headers' ?