Skip to content

Instantly share code, notes, and snippets.

@kprakobkit
Last active February 14, 2019 17:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kprakobkit/b6b032d98d4e72381a9445cbd57370b5 to your computer and use it in GitHub Desktop.
Save kprakobkit/b6b032d98d4e72381a9445cbd57370b5 to your computer and use it in GitHub Desktop.
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