95de7524daa39b527bbc952bffc6f847eeb47d99
2 /********************************************************************************
3 * include/plugin_autoreply.inc.php : The class for auto-replies
4 * --------------------------------
6 * This file is part of the philter distribution
7 * Copyright: See COPYING files that comes with this distribution
8 ********************************************************************************/
10 class AutoReplyPlugin
extends ActionPlugin
{
11 function FwdPlugin() { $this->ActionPlugin(); }
12 function rtti() { return 2; }
13 function name() { return _i18n('2_auto_reply'); }
17 function(Node, data) {
19 var ta = document.createElement('textarea');
20 ta.setAttribute('name', Node.name+'[1]');
21 ta.setAttribute('style', 'width:100%;');
22 ta.setAttribute('rows', '10');
23 if(data[1]) ta.value = data[1];
25 Node.appendChild(document.createElement('br'));
32 function to_string($_data) {
34 $text = explode("\n",$_data[1]);
36 $res = " if(! /^X-Philter-Autoreply: $uid$/)\n" # TODO : et ne vient pas da démon
38 . " to \"| reformail -rt -A'X-Philter-Autoreply: $uid' \\\n"
39 . " | ( cat - ; echo '' ; \\\n";
40 foreach($text as $line)
41 $res .= " echo ".escapeshellarg(chop($line))."; \\\n";
42 $res.= " ) | $"."SENDMAIL -oi -t\"\n";
47 /********************************************************************************
49 * vim: set expandtab shiftwidth=4 tabstop=4 softtabstop=4 textwidth=100:
50 ********************************************************************************/