Created
May 9, 2020 20:25
-
-
Save sunapi386/77f35b401694d312c289609b7d8d2abb to your computer and use it in GitHub Desktop.
Revisions
-
sunapi386 created this gist
May 9, 2020 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ curl -s --user 'api:key-YOURAPIKEYHERE' \ https://api.mailgun.net/v3/mg.example.co/messages \ -F from='Excited User <[email protected]>' \ -F [email protected] \ -F subject='Hello' \ -F text='Testing some Mailgun awesomeness!' This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ import { NodeMailgun } from 'ts-mailgun'; export const mgmailer = new NodeMailgun(); mgmailer.apiKey = 'key-YOURAPIKEYHERE'; mgmailer.domain = 'mg.example.co'; mgmailer.fromEmail = '[email protected]'; mgmailer.fromTitle = "Fancy Company"; mgmailer.init(); mgmailer.send('[email protected]', 'reset pass', 'reset-password?token=$').then((result) => { console.log("Done ", result ) }).catch((error) => { console.log('Error:', error) })