From 6a803c04ab2065db60a13b1aa3333fdfe252f1ab Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Tue, 2 Mar 2021 17:37:01 +0100 Subject: [PATCH] Fixed argument bug --- src/Mailer.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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' }));