diff --git a/src/Mailer.ts b/src/Mailer.ts index 6069467..db590f3 100644 --- a/src/Mailer.ts +++ b/src/Mailer.ts @@ -88,8 +88,9 @@ export class Mailer { * Function for sending a test mail from the test mail template. * @param to_address The address the mail will be sent to - usually the FROM address. */ - public async sendTestMail(to_address: string = config.mail_from, locale: string = "en") { + public async sendTestMail(locale: string = "en") { await i18next.changeLanguage(locale); + const to_address: string = config.mail_from; const template_html = Handlebars.compile(fs.readFileSync(__dirname + '/templates/test.html', { encoding: 'utf8' })); const template_txt = Handlebars.compile(fs.readFileSync(__dirname + '/templates/test.txt', { encoding: 'utf8' }));