@allthings/cloud-toolkit 2.2.0-dev.3 → 2.2.0-dev.5

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/lib.cjs.js CHANGED
@@ -330,7 +330,9 @@ const sendMail = async (config, transport, options, from, responseCallback) => {
330
330
  from,
331
331
  ...options,
332
332
  });
333
- if (responseCallback) ;
333
+ if (responseCallback) {
334
+ await responseCallback(transportResponse);
335
+ }
334
336
  if (!transportResponse) {
335
337
  if (config.logger) {
336
338
  config.logger.error('Sending email failed!');
@@ -356,7 +358,7 @@ const ses = (fromEmailAddress, userConfig) => {
356
358
  SES: { aws: aws__namespace, ses: sesClient },
357
359
  });
358
360
  return {
359
- sendMail: (options) => sendMail(config, transport, options, fromEmailAddress),
361
+ sendMail: (options, responseCallback) => sendMail(config, transport, options, fromEmailAddress, responseCallback),
360
362
  };
361
363
  };
362
364
 
package/dist/lib.esm.js CHANGED
@@ -310,7 +310,9 @@ const sendMail = async (config, transport, options, from, responseCallback) => {
310
310
  from,
311
311
  ...options,
312
312
  });
313
- if (responseCallback) ;
313
+ if (responseCallback) {
314
+ await responseCallback(transportResponse);
315
+ }
314
316
  if (!transportResponse) {
315
317
  if (config.logger) {
316
318
  config.logger.error('Sending email failed!');
@@ -336,7 +338,7 @@ const ses = (fromEmailAddress, userConfig) => {
336
338
  SES: { aws, ses: sesClient },
337
339
  });
338
340
  return {
339
- sendMail: (options) => sendMail(config, transport, options, fromEmailAddress),
341
+ sendMail: (options, responseCallback) => sendMail(config, transport, options, fromEmailAddress, responseCallback),
340
342
  };
341
343
  };
342
344