@tryghost/nodemailer 0.3.20 → 0.3.23

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/lib/nodemailer.js CHANGED
@@ -43,19 +43,19 @@ module.exports = function (transport, options = {}) {
43
43
  break;
44
44
  case 'ses':
45
45
  const aws = require('@aws-sdk/client-ses');
46
- const {defaultProvider} = require('@aws-sdk/credential-provider-node');
47
46
 
48
47
  const pattern = /(.*)email(.*)\.(.*).amazonaws.com/i;
49
48
  const result = pattern.exec(options.ServiceUrl);
50
49
  const region = options.region || (result && result[3]) || 'us-east-1';
51
50
 
52
- process.env.AWS_ACCESS_KEY_ID = options.accessKeyId || options.AWSAccessKeyID;
53
- process.env.AWS_SECRET_ACCESS_KEY = options.secretAccessKey || options.AWSSecretKey;
51
+ const accessKeyId = options.accessKeyId || options.AWSAccessKeyID;
52
+ const secretAccessKey = options.secretAccessKey || options.AWSSecretKey;
53
+ const credentials = (accessKeyId && secretAccessKey) ? {accessKeyId, secretAccessKey} : undefined;
54
54
 
55
55
  const ses = new aws.SES({
56
56
  apiVersion: '2010-12-01',
57
57
  region,
58
- defaultProvider
58
+ credentials
59
59
  });
60
60
 
61
61
  transportOptions = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryghost/nodemailer",
3
- "version": "0.3.20",
3
+ "version": "0.3.23",
4
4
  "repository": "https://github.com/TryGhost/framework/tree/main/packages/nodemailer",
5
5
  "author": "Ghost Foundation",
6
6
  "license": "MIT",
@@ -19,18 +19,17 @@
19
19
  "access": "public"
20
20
  },
21
21
  "devDependencies": {
22
- "c8": "7.11.0",
23
- "mocha": "9.2.2",
22
+ "c8": "7.11.3",
23
+ "mocha": "10.0.0",
24
24
  "should": "13.2.3",
25
- "sinon": "13.0.1"
25
+ "sinon": "14.0.0"
26
26
  },
27
27
  "dependencies": {
28
28
  "@aws-sdk/client-ses": "^3.31.0",
29
- "@aws-sdk/credential-provider-node": "^3.31.0",
30
- "@tryghost/errors": "^1.2.10",
29
+ "@tryghost/errors": "^1.2.13",
31
30
  "nodemailer": "^6.6.3",
32
31
  "nodemailer-direct-transport": "^3.3.2",
33
32
  "nodemailer-stub-transport": "^1.1.0"
34
33
  },
35
- "gitHead": "4a105c2e93c720df158f10c6036f86e5575ca440"
34
+ "gitHead": "6b46efd28457ee4b86cf4ae9da9bf87238099ddd"
36
35
  }