diff --git a/meshmail.js b/meshmail.js index f9f135f0..7b47aeea 100644 --- a/meshmail.js +++ b/meshmail.js @@ -66,6 +66,7 @@ module.exports.CreateMeshMail = function (parent, domain) { function getTemplate(name, domain, lang) { parent.debug('email', 'Getting mail template for: ' + name + ', lang: ' + lang); if (Array.isArray(lang)) { lang = lang[0]; } // TODO: For now, we only use the first language given. + if (lang != null) { lang = lang.split('-')[0]; } // Take the first part of the language, "xx-xx" var r = {}, emailsPath = null; if ((domain != null) && (domain.webemailspath != null)) { emailsPath = domain.webemailspath; }