// append footer to all messagespend footer to all messagesHi Thomas,
On Fri, 11 Nov 2005 18:48:04 +0100, Thomas Bruederli roundcube@gmail.com wrote:
I want to append a text to all messages sent from RC, like yahoo or
others webmails.
I modified the file roundcubemail/program/steps/mail/sendmail.inc, and
just before the following comment:
// create PEAR::Mail_mime instance
i add these lines.
$file = realpath("../../../config/msg_footer.txt"); if(file_exists($file)) { $handle = fopen($file, "r"); $content = fread($handle, filesize($file)); fclose($handle); $_POST['_message'] = $_POST['_message'] . "\n" . $content; }
of course, the file ../../../config/msg_footer.txt exists.
The path to the footer file is wrong. Please note that the index.php file (in RC root folder) is executed and only includes the step file. The path to the text file has t be relative to the root dir: config/msg_footer.txt
You are right.
Finally the code are the following: // append footer to all messages $file = realpath("config/msg_footer.txt"); if(file_exists($file)) { $handle = fopen($file, "r"); $content = fread($handle, filesize($file)); fclose($handle); $_POST['_message'] = $_POST['_message'] . "\n" . $content; }
Perhaps, this feature can be included in the cvs.
Thanks and regards. Jose
Visita http://www.kedesfase.com