Refactored email functionality to Template::get_content_parsed() and check result for validation failure