-
Notifications
You must be signed in to change notification settings - Fork 331
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
1 changed file
with
26 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -155,7 +155,32 @@ Coming soon | |
|
||
We'll use [Waypoint](https://www.usewaypoint.com) for this example, however, you can use any email API like Amazon SES, SendGrid, or MailGun. | ||
|
||
<br> | ||
```javascript | ||
import axios from 'axios'; | ||
|
||
import { renderHtmlDocument } from '@usewaypoint/email-builder'; | ||
|
||
// Replace this with the JSON for your Reader document | ||
const CONFIGURATION: TReaderDocument = {} | ||
|
||
await axios({ | ||
method: 'post', | ||
url: 'https://live.waypointapi.com/v1/email_messages', | ||
headers: { | ||
'Content-Type': 'application/json', | ||
}, | ||
auth: { | ||
username: API_KEY_USERNAME, | ||
password: API_KEY_PASSWORD, | ||
}, | ||
|
||
data: { | ||
to: '[email protected]', | ||
subject: 'Hello', | ||
bodyHtml: renderHtmlDocument(CONFIGURATION, 'root'), | ||
}, | ||
}); | ||
``` | ||
|
||
--- | ||
|
||
|