Skip to content

Commit

Permalink
small improvements to the mail service
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-fabian committed Oct 20, 2022
1 parent 5786b80 commit 12a0fe3
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/services/mail/base-mail.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
18 changes: 18 additions & 0 deletions src/services/mail/email.model.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { Attachment } from 'nodemailer/lib/mailer';

/**
* The base information for an email that can be send with nodemailer.
*/
Expand All @@ -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.
*/
Expand Down

0 comments on commit 12a0fe3

Please sign in to comment.