backend/src/mailer.ts
2021-03-04 15:51:05 +01:00

35 lines
1006 B
TypeScript

import { config } from './config';
/**
* This class is responsible for all things mail sending.
* This uses the mail emplates from src/static/mail_templates
*/
export class Mailer {
/**
* The class's default constructor.
* Creates the transporter and tests the connection.
*/
constructor() {
}
/**
* 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.
*/
public async sendResetMail(to_address: string, token: string) {
}
/**
* Function for sending a test mail from the test mail template.
* @param to_address The address the test mail will be sent to - this is the configured from-address by default.
*/
public async sendTestMail(to_address: string = config.mail_from) {
}
}