how to add parameters to html email template I have a working html email using modules: Mail System, HTML Mail, SMTP Authentication Support.

And I want to include some parameters/variables in the html email template file:

htmlmail--htmlmail.tpl.php


some variables include: $base_path etc. from page.tpl.php variables

From what I've read from the Internet, you may use "hooking" and I haven't yet hooked variables so far for my template file.
you can use the yourtheme_preprocess_htmlmail() function for htmlmail email template in put in the template.php file of your current theme. I will give an example.  

function yourtheme_preprocess_htmlmail(&amp;$variables) {
  switch($variables['key']){
    case 'password-reset':
     $variables['var1'] = t('SAMPLE TEXT');
     break;
    case 'register-no-approval-required':
     $variables['var1'] = t('SAMPLE TEXT');
     break;        
    break;
   }
   $variables['heading'] = t('Heading text');
   $variables['copyright'] = t('Copyright text.');
 }


In this example. I created some customized variables base on the mailkey and defined some others like heading, copyright