Putting data from 3 text files into 3 variables
For one thing, you can use file_get_contents:

$email_template = file_get_contents($template_filename);
$subject_template = file_get_contents($subject_filename);
$footer_template = file_get_contents($footer_filename);