ag-common 0.0.704 → 0.0.705

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.
@@ -27,18 +27,24 @@ const sendEmail = (_a) => __awaiter(void 0, [_a], void 0, function* ({ to, messa
27
27
  (0, log_1.warn)('ses arn not equal to config region changing to:' + sourceArnRegion);
28
28
  (0, exports.setSes)(sourceArnRegion);
29
29
  }
30
+ const ishtml = message.startsWith('<!DOCTYPE HTML') || message.startsWith('<html');
30
31
  yield exports.ses.send(new client_ses_1.SendEmailCommand({
31
32
  Destination: {
32
33
  CcAddresses: [],
33
34
  ToAddresses: [to],
34
35
  },
35
36
  Message: {
36
- Body: {
37
- Text: {
37
+ Body: Object.assign(Object.assign({}, (ishtml && {
38
+ Html: {
39
+ Data: message,
38
40
  Charset: 'UTF-8',
41
+ },
42
+ })), (!ishtml && {
43
+ Text: {
39
44
  Data: message,
45
+ Charset: 'UTF-8',
40
46
  },
41
- },
47
+ })),
42
48
  Subject: {
43
49
  Charset: 'UTF-8',
44
50
  Data: subject,
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.704",
2
+ "version": "0.0.705",
3
3
  "name": "ag-common",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",