@maioradv/nestjs-core 2.1.5 → 2.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,6 +7,7 @@ export declare class MailerService {
7
7
  readonly client: Transporter<SentMessageInfo>;
8
8
  private sdkConfigs;
9
9
  constructor(config: ConfigService);
10
+ static formatAddress(name: string, email: string): string;
10
11
  sendMail({ from, to, subject, html, text, }: {
11
12
  /** From email as email or ['From Name',email]
12
13
  * @example 'user@email.com'
@@ -21,6 +21,9 @@ let MailerService = class MailerService {
21
21
  ...this.sdkConfigs
22
22
  });
23
23
  }
24
+ static formatAddress(name, email) {
25
+ return `"${name}" <${email}>`;
26
+ }
24
27
  async sendMail({ from, to, subject, html, text, }) {
25
28
  return this.client.sendMail({
26
29
  from: Array.isArray(from) ? `"${from[0]}" <${from[1]}>` : from,
@@ -85,7 +85,7 @@ class EmailBuilder {
85
85
  async build(args) {
86
86
  const { subject, template } = await this.initEmail();
87
87
  return {
88
- subject: this.replace(subject, args),
88
+ subject,
89
89
  html: template({
90
90
  ...args,
91
91
  locale: this.locale
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maioradv/nestjs-core",
3
- "version": "2.1.5",
3
+ "version": "2.1.7",
4
4
  "description": "NestJS helpers by MaiorADV",
5
5
  "repository": "https://github.com/maioradv/nestjs-core.git",
6
6
  "author": "Maior ADV Srl",