Updated comments

This commit is contained in:
Nicolai Ort 2021-03-02 17:22:08 +01:00
parent 314ceaca9d
commit d77670fb70

View File

@ -11,11 +11,10 @@ import { MailServerConfigError } from './errors/MailErrors';
/** /**
* This class is responsible for all things pdf creation. * This class is responsible for all mail sending.
* This uses the html templates from src/templates. * This uses the html and plaintext templates from src/templates.
*/ */
export class Mailer { export class Mailer {
private templateDir = path.join(__dirname, '/templates');
private transport: Mail; private transport: Mail;
private static interpolations = { copyright_owner: config.copyright_owner } private static interpolations = { copyright_owner: config.copyright_owner }
@ -63,7 +62,7 @@ export class Mailer {
} }
/** /**
* Function for sending a test mail from the test mail template. * Function for sending a reset mail from the reset mail template.
* @param to_address The address the mail will be sent to. Should always get pulled from a user object. * @param to_address The address the mail will be sent to. Should always get pulled from a user object.
* @param token The requested password reset token - will be combined with the app_url to generate a password reset link. * @param token The requested password reset token - will be combined with the app_url to generate a password reset link.
*/ */
@ -87,8 +86,7 @@ export class Mailer {
/** /**
* Function for sending a test mail from the test mail template. * Function for sending a test mail from the test mail template.
* @param to_address The address the mail will be sent to. Should always get pulled from a user object. * @param to_address The address the mail will be sent to - usually the FROM address.
* @param token The requested password reset token - will be combined with the app_url to generate a password reset link.
*/ */
public async sendTestMail(to_address: string = config.mail_from, locale: string = "en") { public async sendTestMail(to_address: string = config.mail_from, locale: string = "en") {
await i18next.changeLanguage(locale); await i18next.changeLanguage(locale);