From 2f6d4e8f4304eb726736be9b4bde05cea146ad76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Carvalh=C3=A3o?= Date: Mon, 12 Apr 2021 08:53:43 +0100 Subject: [PATCH] chore(readme): update readme file --- README.md | 14 ++++++++++---- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 5a20a10..c633695 100644 --- a/README.md +++ b/README.md @@ -81,9 +81,7 @@ interface EmailOptions { html?: string; template?: string; attachment?; - 'recipient-variables'?: { - [email: string]: any; - }; + 'h:X-Mailgun-Variables'?: string; } ``` @@ -103,9 +101,17 @@ export class YourService { text: '', html: '', attachment:'' + 'h:X-Mailgun-Variables': '{"key":"value"}' }; await this.mailgunService.sendEmail(options); + + + // OR can use the class + + const email = new MailgunEmailModel('from', 'to', 'subject', 'text', 'html', 'template','attachment', { key: 'value' }); + + await this.mailgunService.sendEmail(email); } ``` @@ -120,7 +126,7 @@ import { EmailOptions } from '@nextnm/nestjs-mailgun' @Injectable() export class YourService { constructor(private mailgunService: MailgunService) { - await this.mailgunService.verifyEmail('next@examle.com); + await this.mailgunService.verifyEmail('next@examle.com'); } } ``` diff --git a/package-lock.json b/package-lock.json index fca6cde..a07a96c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@nextnm/nestjs-mailgun", - "version": "1.1.0", + "version": "1.1.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 6c8a0f1..ce1be28 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@nextnm/nestjs-mailgun", - "version": "1.1.0", + "version": "1.1.1", "description": "NestJS provider for sending emails with mailgun", "author": "Nuno Carvalhão ", "license": "MIT",