All URIs are relative to https://api.postmarkapp.com
Method | HTTP request | Description |
---|---|---|
send_email | POST /email | Send a single email |
send_email_batch | POST /email/batch | Send a batch of emails |
send_email_with_template | POST /email/withTemplate | Send an email using a Template |
SendEmailResponse send_email(x_postmark_server_token, body=body)
Send a single email
from __future__ import print_statement
import time
import postmark
from postmark.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = postmark.SendingAPIApi()
x_postmark_server_token = 'x_postmark_server_token_example' # str | The token associated with the Server on which this request will operate.
body = postmark.SendEmailRequest() # SendEmailRequest | (optional)
try:
# Send a single email
api_response = api_instance.send_email(x_postmark_server_token, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling SendingAPIApi->send_email: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
x_postmark_server_token | str | The token associated with the Server on which this request will operate. | |
body | SendEmailRequest | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SendEmailBatchResponse send_email_batch(x_postmark_server_token, body=body)
Send a batch of emails
from __future__ import print_statement
import time
import postmark
from postmark.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = postmark.SendingAPIApi()
x_postmark_server_token = 'x_postmark_server_token_example' # str | The token associated with the Server on which this request will operate.
body = postmark.SendEmailBatchRequest() # SendEmailBatchRequest | (optional)
try:
# Send a batch of emails
api_response = api_instance.send_email_batch(x_postmark_server_token, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling SendingAPIApi->send_email_batch: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
x_postmark_server_token | str | The token associated with the Server on which this request will operate. | |
body | SendEmailBatchRequest | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SendEmailResponse send_email_with_template(x_postmark_server_token, body)
Send an email using a Template
from __future__ import print_statement
import time
import postmark
from postmark.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = postmark.SendingAPIApi()
x_postmark_server_token = 'x_postmark_server_token_example' # str | The token associated with the Server on which this request will operate.
body = postmark.EmailWithTemplateRequest() # EmailWithTemplateRequest |
try:
# Send an email using a Template
api_response = api_instance.send_email_with_template(x_postmark_server_token, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling SendingAPIApi->send_email_with_template: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
x_postmark_server_token | str | The token associated with the Server on which this request will operate. | |
body | EmailWithTemplateRequest |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]