Skip to content

Latest commit

 

History

History
72 lines (49 loc) · 2.4 KB

File metadata and controls

72 lines (49 loc) · 2.4 KB

SimplyCom\MailApi

All URIs are relative to https://api.simply.com/2, except if the operation defines another base path.

Method HTTP request Description
addMailAccount() POST /my/products/{object}/mail/accounts/ Add new mail account to a product

addMailAccount()

addMailAccount($object, $addMailAccountRequest): \SimplyCom\SimplyCom\Model\UpdateDnsRecord200Response

Add new mail account to a product

Creates a new email account for the product. The email address will be username@domain. The account will be created with the product's default mail quota.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: basicAuth
$config = SimplyCom\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new SimplyCom\Api\MailApi(
    // 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
);
$object = example.com; // string | The product handle/UUID, as found in the /my/products/ endpoint.
$addMailAccountRequest = new \SimplyCom\SimplyCom\Model\AddMailAccountRequest(); // \SimplyCom\SimplyCom\Model\AddMailAccountRequest

try {
    $result = $apiInstance->addMailAccount($object, $addMailAccountRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MailApi->addMailAccount: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
object string The product handle/UUID, as found in the /my/products/ endpoint.
addMailAccountRequest \SimplyCom\SimplyCom\Model\AddMailAccountRequest

Return type

\SimplyCom\SimplyCom\Model\UpdateDnsRecord200Response

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]