Compare commits

...

11 Commits

Author SHA1 Message Date
f3591bdc67 1.0.13 2020-01-11 11:13:41 +00:00
ece9508161 fix(core): update 2020-01-11 11:13:41 +00:00
761d7e78de 1.0.12 2020-01-11 11:11:49 +00:00
0c44cf09b4 fix(core): update 2020-01-11 11:11:48 +00:00
aee7c80e26 1.0.11 2019-10-28 16:15:16 +01:00
c60702fb49 fix(core): update 2019-10-28 16:15:16 +01:00
354c38a429 1.0.10 2019-10-28 16:10:20 +01:00
f477cad6e9 fix(core): update 2019-10-28 16:10:20 +01:00
631aaadb43 1.0.9 2019-10-28 16:07:15 +01:00
a831cf7e9a fix(core): update 2019-10-28 16:07:14 +01:00
e6125c9a13 1.0.8 2019-10-28 15:57:11 +01:00
5 changed files with 18 additions and 6 deletions

8
.gitlab-webide.yml Normal file
View File

@ -0,0 +1,8 @@
terminal:
image: registry.gitlab.com/hosttoday/ht-docker-node
before_script:
- npm install -g npm-check
variables:
RAILS_ENV: "test"
NODE_ENV: "test"

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "@mojoio/mailgun",
"version": "1.0.7",
"version": "1.0.13",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "@mojoio/mailgun",
"version": "1.0.7",
"version": "1.0.13",
"private": false,
"description": "an api abstraction package for mailgun",
"main": "dist/index.js",

View File

@ -25,7 +25,7 @@ tap.test('should create a smartmail', async () => {
});
tap.test('should send a smartmail', async () => {
testMailgunAccount.sendSmartMail(testSmartmail, 'phil@lossless.com');
testMailgunAccount.sendSmartMail(testSmartmail, 'sandbox@mail.git.zone');
});
tap.start();

View File

@ -14,7 +14,7 @@ export class MailgunAccount {
method: 'GET',
headers: {
Authorization: `Basic ${plugins.smartstring.base64.encode(
this.apiToken
`api:${this.apiToken}`
)}`,
'Content-Type': 'application/json'
}
@ -28,7 +28,7 @@ export class MailgunAccount {
{
headers: {
Authorization: `Basic ${plugins.smartstring.base64.encode(
`api:key-a049e048b7029b9621c41b5682fadee9`
`api:${this.apiToken}`
)}`
}
},
@ -75,6 +75,10 @@ export class MailgunAccount {
}
const response = await this.postFormData(`/${domain}/messages`, formFields);
console.log(response);
if (response.statusCode === 200) {
return response.body;
} else {
throw new Error('could not send email');
}
}
}