4 * Additional Message Headers
6 * Very simple plugin which will add additional headers
7 * to or remove them from outgoing messages.
9 * Enable the plugin in config/main.inc.php and add your desired headers:
10 * $rcmail_config['additional_message_headers'] = array('User-Agent');
12 * @version @package_version@
14 * @website http://roundcube.net
16 class additional_message_headers extends rcube_plugin
18 public $task = 'mail';
22 $this->add_hook('message_outgoing_headers', array($this, 'message_headers'));
25 function message_headers($args)
29 // additional email headers
30 $additional_headers = rcmail::get_instance()->config->get('additional_message_headers',array());
31 foreach($additional_headers as $header=>$value){
32 if (null === $value) {
33 unset($args['headers'][$header]);
35 $args['headers'][$header] = $value;