Dears,

I have using roundcube 0.2 beta in production environment and works fine.

I did a couple of small changes to customize for our needs, I'd like to share.

Here's one.

 

I used $rcmail_config['generic_message_footerl'] = 'disclaimer.html'; as a 
disclaimer but the problem is that the text only mails were with html codes.

So, I modified the config to:

 

$rcmail_config['generic_message_footer_html'] = 'disclaimer.html';

$rcmail_config['generic_message_footer_txt'] = 'disclaimer.txt';

 

Then I changed the file: program/steps/mail/sendmail.inc

I removed the original line as:

 

if (!$savedraft && !empty($CONFIG['generic_message_footer']) && ($footer = 
file_get_contents(realpath($CONFIG['generic_message_footer']))))

                $message_body .= "\r\n" . rcube_charset_convert($footer, 
'UTF-8', $message_charset);

 

 

And added it right below:

 

 

if ($isHtml)

{       # MOD START

        if (!$savedraft && !empty($CONFIG['generic_message_footer_html']) && 
($footer = file_get_contents(realpath($CONFIG['generic_message_footer_html']))))

                $message_body .= "\r\n" . rcube_charset_convert($footer, 
'UTF-8', $message_charset);

        # MOD END

 

  $MAIL_MIME->setHTMLBody($message_body);

 

  // add a plain text version of the e-mail as an alternative part.

  $h2t = new html2text($message_body);

  $plainTextPart = wordwrap($h2t->get_text(), 998, "\r\n", true);

  if (!strlen($plainTextPart))

    {

    // empty message body breaks attachment handling in drafts

    $plainTextPart = "\r\n";

    }

  $MAIL_MIME->setTXTBody(html_entity_decode($plainTextPart, ENT_COMPAT, 
'utf-8'));

 

  // look for "emoticon" images from TinyMCE and copy into message as 
attachments

  rcmail_attach_emoticons($MAIL_MIME);

  }

else

{

        # MOD START

        if (!$savedraft && !empty($CONFIG['generic_message_footer_txt']) && 
($footer = file_get_contents(realpath($CONFIG['generic_message_footer_txt']))))

                $message_body .= "\r\n" . rcube_charset_convert($footer, 
'UTF-8', $message_charset);

        # MOD END

 

 

Hope it helps someone. Maybe it would be usefull to be included in next release.

Thanks in advnce.

 

 

Jonathan Araújo

Administrador de Infra-estrutura de TI

Gerência de TI - INDG S.A.

 





--------------------------------------------------------------------------------
Este documento pode incluir informação confidencial e de propriedade restrita 
do Instituto de Desenvolvimento Gerencial-INDG e apenas pode ser lido por 
aquele(s) a quem sido endereçado. Se você recebeu esta mensagem de e-mail 
indevidamente, por favor avise-nos imediatamente. Quaisquer opiniões ou 
informações contidas neste e-mail pertencem ao seu remetente e não 
necessariamente coincidem com as do Instituto de Desenvolvimento 
Gerencial-INDG. Este documento não pode ser reproduzido, copiado, distribuído, 
publicado ou modificado por terceiros, sem a prévia autorização por escrito do 
Instituto de Desenvolvimento Gerencial-INDG.
 
This document may include proprietary and confidential information of Instituto 
de Desenvolvimento Gerencial-INDG, and may only be read by those persons to 
whom it is addressed. If you have received this e-mail message in error, please 
notify us immediately. Any views or opinions  expressed in this e-mail are 
those of the sender and do not necessarily coincide with those of the Instituto 
de Desenvolvimento Gerencial - INDG. This document may not be reproduced, 
copied, distributed, published, modified or furnished to third parties, without 
the prior written consent of Instituto de Desenvolvimento Gerencial-INDG. 
--------------------------------------------------------------------------------

_______________________________________________
List info: http://lists.roundcube.net/dev/

Reply via email to