diff --git a/package.json b/package.json index 9d04ff4..b2c2354 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "lbx-jwt", "description": "Provides JWT authentication for loopback applications. Includes storing roles inside tokens and handling refreshing. Built-in reuse detection.", - "version": "1.0.0", + "version": "1.0.1", "keywords": [ "lb4", "LoopBack", diff --git a/src/services/mail/base-mail.service.ts b/src/services/mail/base-mail.service.ts index 588f1da..df498bb 100644 --- a/src/services/mail/base-mail.service.ts +++ b/src/services/mail/base-mail.service.ts @@ -31,7 +31,7 @@ export abstract class BaseMailService< /** * The path to the base email template. */ - private readonly BASE_MAIL_TEMPLATE_PATH: string = `${LBX_JWT_MAIL_TEMPLATE_DIRECTORY}/base-mail.hbs`; + protected readonly BASE_MAIL_TEMPLATE_PATH: string = `${LBX_JWT_MAIL_TEMPLATE_DIRECTORY}/base-mail.hbs`; /** * The email transporter that sends all the emails. diff --git a/src/services/mail/email.model.ts b/src/services/mail/email.model.ts index 512040d..3832cdb 100644 --- a/src/services/mail/email.model.ts +++ b/src/services/mail/email.model.ts @@ -1,3 +1,5 @@ +import { Attachment } from 'nodemailer/lib/mailer'; + /** * The base information for an email that can be send with nodemailer. */ @@ -10,6 +12,22 @@ export interface Email { * The mail account that sends the email. */ from: string, + /** + * The sender of the email. Can differ from the email that technically sends the email. + */ + sender?: string, + /** + * The cc field of the email. + */ + cc?: string, + /** + * The bcc field of the email. + */ + bcc?: string, + /** + * Any attachments of the email. + */ + attachments?: Attachment[], /** * The subject of the email. */