plenna_utilities 1.5.0 → 1.5.2
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.
package/dist/src/mailer/index.js
CHANGED
|
@@ -8,7 +8,7 @@ class Mailer {
|
|
|
8
8
|
}
|
|
9
9
|
async sendEmail(templateId, destiny, params) {
|
|
10
10
|
try {
|
|
11
|
-
await fetch('https://api.sendinblue.com/v3/smtp/email', {
|
|
11
|
+
const response = await fetch('https://api.sendinblue.com/v3/smtp/email', {
|
|
12
12
|
method: 'post',
|
|
13
13
|
headers: {
|
|
14
14
|
accept: 'application/json',
|
|
@@ -21,9 +21,11 @@ class Mailer {
|
|
|
21
21
|
templateId
|
|
22
22
|
})
|
|
23
23
|
});
|
|
24
|
+
console.log(JSON.stringify(response));
|
|
24
25
|
return true;
|
|
25
26
|
}
|
|
26
27
|
catch (error) {
|
|
28
|
+
console.log(JSON.stringify(error));
|
|
27
29
|
console.log('error sending email');
|
|
28
30
|
return false;
|
|
29
31
|
}
|