@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,
|