Postmark binding spec
Detailed documentation on the Postmark binding component
Component format
To setup Postmark binding create a component of type bindings.postmark
. See this guide on how to create and apply a binding configuration.
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: postmark
spec:
type: bindings.postmark
metadata:
- name: accountToken
value: "YOUR_ACCOUNT_TOKEN" # required, this is your Postmark account token
- name: serverToken
value: "YOUR_SERVER_TOKEN" # required, this is your Postmark server token
- name: emailFrom
value: "testapp@dapr.io" # optional
- name: emailTo
value: "dave@dapr.io" # optional
- name: subject
value: "Hello!" # optional
Warning
The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets as described here.Spec metadata fields
Field | Required | Binding support | Details | Example |
---|---|---|---|---|
accountToken |
Y | Output | The Postmark account token, this should be considered a secret value | "account token" |
serverToken |
Y | Output | The Postmark server token, this should be considered a secret value | "server token" |
emailFrom |
N | Output | If set this specifies the ‘from’ email address of the email message | "me@exmaple.com" |
emailTo |
N | Output | If set this specifies the ’to’ email address of the email message | "me@example.com" |
emailCc |
N | Output | If set this specifies the ‘cc’ email address of the email message | "me@example.com" |
emailBcc |
N | Output | If set this specifies the ‘bcc’ email address of the email message | "me@example.com" |
subject |
N | Output | If set this specifies the subject of the email message | "me@example.com" |
You can specify any of the optional metadata properties on the output binding request too (e.g. emailFrom
, emailTo
, subject
, etc.)
Combined, the optional metadata properties in the component configuration and the request payload should at least contain the emailFrom
, emailTo
and subject
fields, as these are required to send an email with success.
Binding support
This component supports output binding with the following operations:
create
Example request payload
{
"operation": "create",
"metadata": {
"emailTo": "changeme@example.net",
"subject": "An email from Dapr Postmark binding"
},
"data": "<h1>Testing Dapr Bindings</h1>This is a test.<br>Bye!"
}
Related links
- Basic schema for a Dapr component
- Bindings building block
- How-To: Trigger application with input binding
- How-To: Use bindings to interface with external resources
- Bindings API reference
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.
Last modified May 31, 2024: Merge 61e65296a85dd35c3b7040b281b7c17caffcc144 into 27b6a61b0e1b0a30ea4e4f31bea712dfec3813b3 (525f2ab)