fix(core): update
This commit is contained in:
		| @@ -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'); | ||||
|     } | ||||
|   } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user