@ikonintegration/ikapi 4.0.0-alpha16 → 4.0.0-alpha18

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikonintegration/ikapi",
3
- "version": "4.0.0-alpha16",
3
+ "version": "4.0.0-alpha18",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "module": "main.js",
@@ -21,13 +21,13 @@ export default class IKMailer {
21
21
  });
22
22
  }
23
23
 
24
- //to can be an array or just one address
25
- async sendTemplatedEmail(_to, _templates, _data, _optionalCC, _optionalAttachments, _optionalHeaders) {
24
+ //to and cc can be an array, just one address or a comma separated string containing multiple addresses
25
+ async sendTemplatedEmail(_to, _templates, _data, _optionalCC, _optionalAttachments, _optionalHeaders, _optionalFrom) {
26
26
  //Generate emails
27
27
  const email = new Email({
28
28
  message: {
29
29
  ...(_optionalHeaders ? {headers: _optionalHeaders} : {}),
30
- from: this.from,
30
+ from: _optionalFrom ? _optionalFrom : this.from,
31
31
  to: _to,
32
32
  ...(_optionalAttachments ? {attachments: _optionalAttachments} : {}),
33
33
  ...(_optionalCC ? {cc: _optionalCC} : {})
@@ -35,6 +35,7 @@ export default class IKMailer {
35
35
  transport: this.transporter,
36
36
  send: true,
37
37
  });
38
+ console.debug('Sending email:', email);
38
39
  //
39
40
  let resp = null;
40
41
  try {