-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
12 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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('[email protected]); | ||
await this.mailgunService.verifyEmail('[email protected]'); | ||
} | ||
} | ||
``` | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <[email protected]>", | ||
"license": "MIT", | ||
|