'use strict'; const prettifyStack = require("../error/stack/prettify"); module.exports = function generateEmailPreview({environmentName, error, hostname}, stackFilter) { return ` An unhandled ${error.name} occurred. Environment: ${environmentName} Hostname: ${hostname} __________________________________________ Simplified error stacktrace: ${prettifyStack(error.stackWithout(stackFilter, true))} __________________________________________ The full error information is attached. `.trim(); };