All URIs are relative to https://api.mimepost.com/v1/
Method | HTTP request | Description |
---|---|---|
sendEmail | POST /emails/ | Send email |
\MimePost\Client\Model\ApiResponse sendEmail($body)
Send email
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = MimePost\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MimePost\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
$apiInstance = new MimePost\Client\Api\EmailsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \MimePost\Client\Model\Email(); // \MimePost\Client\Model\Email | Single Email object
try {
$result = $apiInstance->sendEmail($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling EmailsApi->sendEmail: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \MimePost\Client\Model\Email | Single Email object |
\MimePost\Client\Model\ApiResponse
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]