mailgun.js 12.6.0 → 12.6.1

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.
@@ -1,4 +1,4 @@
1
- // mailgun.js v12.5.0 Copyright (c) 2026 Mailgun and contributors
1
+ // mailgun.js v12.6.0 Copyright (c) 2026 Mailgun and contributors
2
2
  define(['exports'], (function (exports) { 'use strict';
3
3
 
4
4
  var Resolution;
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [12.6.1](https://github.com/mailgun/mailgun.js/compare/v12.6.0...v12.6.1) (2026-01-12)
6
+
7
+
8
+ ### Other changes
9
+
10
+ * Remove "key-" prefix from examples ([d0b2e90](https://github.com/mailgun/mailgun.js/commits/d0b2e90691c6c480814dd34cc70a90d060fdadae))
11
+
5
12
  ## [12.6.0](https://github.com/mailgun/mailgun.js/compare/v12.5.0...v12.6.0) (2026-01-08)
6
13
 
7
14
 
@@ -1,4 +1,4 @@
1
- // mailgun.js v12.5.0 Copyright (c) 2026 Mailgun and contributors
1
+ // mailgun.js v12.6.0 Copyright (c) 2026 Mailgun and contributors
2
2
  'use strict';
3
3
 
4
4
  var Resolution;
@@ -1,4 +1,4 @@
1
- // mailgun.js v12.5.0 Copyright (c) 2026 Mailgun and contributors
1
+ // mailgun.js v12.6.0 Copyright (c) 2026 Mailgun and contributors
2
2
  var Resolution;
3
3
  (function (Resolution) {
4
4
  Resolution["HOUR"] = "hour";
@@ -1,4 +1,4 @@
1
- // mailgun.js v12.5.0 Copyright (c) 2026 Mailgun and contributors
1
+ // mailgun.js v12.6.0 Copyright (c) 2026 Mailgun and contributors
2
2
  var Resolution;
3
3
  (function (Resolution) {
4
4
  Resolution["HOUR"] = "hour";
package/README.md CHANGED
@@ -41,7 +41,7 @@ npm install mailgun.js
41
41
 
42
42
  ## Setup Client
43
43
 
44
- The next step is to import the module and instantiate a mailgun client by calling `new Mailgun(formData)` and then using `mailgun.client` setup the client with basic auth credentials `(username: 'api', key: 'key-yourkeyhere')`.
44
+ The next step is to import the module and instantiate a mailgun client by calling `new Mailgun(formData)` and then using `mailgun.client` setup the client with basic auth credentials `(username: 'api', key: 'MAILGUN_API_KEY')`.
45
45
 
46
46
  NOTE: starting from version 3.0 you need to pass FormData (we need this to keep library universal). For node.js you can use built-in FormData or `form-data` library.
47
47
 
@@ -53,12 +53,12 @@ Once the package is installed, you can import the library using `import` or `req
53
53
  ```js
54
54
  const Mailgun = require('mailgun.js');
55
55
  const mailgun = new Mailgun(FormData); // or const formData = require('form-data');
56
- const mg = mailgun.client({username: 'api', key: process.env.MAILGUN_API_KEY || 'key-{yourkeyhere}'});
56
+ const mg = mailgun.client({username: 'api', key: process.env.MAILGUN_API_KEY || 'MAILGUN_API_KEY'});
57
57
  ```
58
58
  ```js
59
59
  import Mailgun from 'mailgun.js';
60
60
  const mailgun = new Mailgun(FormData); // or import formData from 'form-data';
61
- const mg = mailgun.client({username: 'api', key: process.env.MAILGUN_API_KEY || 'key-{yourkeyhere}'});
61
+ const mg = mailgun.client({username: 'api', key: process.env.MAILGUN_API_KEY || 'MAILGUN_API_KEY'});
62
62
  ```
63
63
 
64
64
  Be aware that there are four bundles available for usage. All of them are conditionally exported by package.json and separated by environment (Browser/Node.js):
@@ -155,7 +155,7 @@ const mailgun = new Mailgun(FormData);
155
155
 
156
156
  const mg = mailgun.client({
157
157
  username: 'api',
158
- key: process.env.MAILGUN_API_KEY || 'key-yourkeyhere',
158
+ key: process.env.MAILGUN_API_KEY || 'MAILGUN_API_KEY',
159
159
  useFetch: true,
160
160
  });
161
161
  ```
@@ -170,7 +170,7 @@ Example:
170
170
 
171
171
  const mg = mailgun.client({
172
172
  username: 'api',
173
- key: process.env.MAILGUN_API_KEY || 'key-yourkeyhere',
173
+ key: process.env.MAILGUN_API_KEY || 'MAILGUN_API_KEY',
174
174
  proxy: {
175
175
  protocol: 'https' // 'http' ,
176
176
  host: '127.0.0.1', // use your proxy host here
@@ -190,7 +190,7 @@ Primary accounts can make API calls on behalf of their subaccounts. [API documen
190
190
  ```js
191
191
  import Mailgun from 'mailgun.js';
192
192
  const mailgun = new Mailgun(FormData); // or import FormData from 'form-data'
193
- const mg = mailgun.client({username: 'api', key: process.env.MAILGUN_API_KEY || 'key-yourkeyhere'});
193
+ const mg = mailgun.client({username: 'api', key: process.env.MAILGUN_API_KEY || 'MAILGUN_API_KEY'});
194
194
  mg.setSubaccount('subaccount-id');
195
195
  // then, if you need to reset it back to the primary account:
196
196
  mg.resetSubaccount();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mailgun.js",
3
- "version": "12.6.0",
3
+ "version": "12.6.1",
4
4
  "author": "Mailgun",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/version.md CHANGED
@@ -1 +1 @@
1
- 12.6.0
1
+ 12.6.1