fix(core): update
This commit is contained in:
parent
354c38a429
commit
c60702fb49
@ -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(
|
||||
this.apiToken
|
||||
`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');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user