How to set header and footer for any drupal_mail messsage?
Take a look at hook_mail.  All emails from the system "should" go through that.  You can alter the $message['body'] to add your header and footer.  If you only want to do this for certain emails, you can use an IF condition on the $key.

Edit: I think I pointed you to the wrong hook.  You probably want to use hook_mail_alter to change every email that Drupal sends.