Last active
February 14, 2019 17:56
-
-
Save kprakobkit/b6b032d98d4e72381a9445cbd57370b5 to your computer and use it in GitHub Desktop.
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
import request from "request-promise"; | |
const sendEmail = async () => { | |
await request({ | |
method: "POST", | |
json: true, | |
uri: "http://mountebank:3014/emails", // this is hardcoded but it could be parameterized by environment | |
body: { | |
to: "recipient@example.com", | |
from: "sender@example.com", | |
content: "Hi!" | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment