added support for email header and footers