Updated comments
This commit is contained in:
		@@ -11,11 +11,10 @@ import { MailServerConfigError } from './errors/MailErrors';
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * This class is responsible for all things pdf creation.
 | 
			
		||||
 * This uses the html templates from src/templates.
 | 
			
		||||
 * This class is responsible for all mail sending.
 | 
			
		||||
 * This uses the html and plaintext templates from src/templates.
 | 
			
		||||
 */
 | 
			
		||||
export class Mailer {
 | 
			
		||||
    private templateDir = path.join(__dirname, '/templates');
 | 
			
		||||
    private transport: Mail;
 | 
			
		||||
    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 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.
 | 
			
		||||
     * @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 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") {
 | 
			
		||||
        await i18next.changeLanguage(locale);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user