Author Topic: Adding recipient's email address to an html email disclaimer  (Read 2881 times)

Offline ENGINEER

  • Newbie
  • *
  • Posts: 1
Adding recipient's email address to an html email disclaimer
« on: September 04, 2013, 11:33:43 PM »
I would like to include the recipient's email address in my email disclaimer. I know that to include an html disclaimer, I have to create an html file and refer to it in the main.inc.php file as show below:

// path to a text file which will be added to each sent HTML message
// paths are relative to the Roundcube root folder
$rcmail_config['generic_message_footer_html'] = 'path/to/disclaimer.html';


I want my disclaimer to be in the form:




This message is intended only for recipient@somedomain.com. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.




I have tried using
Code: [Select]
<?php echo $to?> and
Code: [Select]
<?php echo $mailto?> as the recipient email address in my disclaimer.html file, but when an email is sent, in each case the recipient only gets the following message:




This message is intended only for . If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.




How can I resolve this? (I'm using RoundCube 0.9.2)
« Last Edit: September 04, 2013, 11:37:03 PM by ENGINEER »

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,882
    • SKaero - Custom Roundcube development
Re: Adding recipient's email address to an html email disclaimer
« Reply #1 on: September 05, 2013, 12:31:26 AM »
Hmm, I don't think you could get the email address in the generic_message_footer_html file I think you would need to do a string replacement using a plugin. You should be able to do it with the message_outgoing_body http://trac.roundcube.net/wiki/Plugin_Hooks#message_outgoing_body hook.