My header is calling a javascript file which sends out an email:
You could create a Javascript snippet that saves the template dir in a variable, and use this later:
<script> var templateDir = "<?php bloginfo('template_directory') ?>"; </script>