-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
58d548f
commit b732449
Showing
1 changed file
with
13 additions
and
2 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 |
---|---|---|
|
@@ -64,9 +64,20 @@ extension Application { | |
This will give you easy access to the SDK methods using `application` and `request`. | ||
```swift | ||
app.get { req async in | ||
try await req.indiePitcher.listContacts() | ||
|
||
let emailBody = """ | ||
This is a sample body that supports **markdown**. Plain html is also supported. | ||
""" | ||
|
||
try await indiePitcher.sendEmail( | ||
data: .init( | ||
to: "[email protected]", subject: "Hello from AWS Lambda!", body: emailBody, | ||
bodyFormat: .markdown)) | ||
|
||
return "ok" | ||
} | ||
``` | ||
See the [full example repository](https://github.com/IndiePitcher/VaporExample). | ||
|
||
<br/> | ||
|
||
|
@@ -126,7 +137,7 @@ struct MyLambda: SimpleLambdaHandler { | |
|
||
try await indiePitcher.sendEmail( | ||
data: .init( | ||
to: "[email protected]", subject: "Hello from ASS Lambda!", body: emailBody, | ||
to: "[email protected]", subject: "Hello from AWS Lambda!", body: emailBody, | ||
bodyFormat: .markdown)) | ||
|
||
return "Email sent!" | ||
|