This is the API client for the Mail Configuration API
PHP 8.1 and later.
To install the bindings via Composer, add the following to composer.json:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/ionos-productivity/ionos-mail-configuration-api-client.git"
}
],
"require": {
"ionos-productivity/ionos-mail-configuration-api-client": "*@dev"
}
}Then run composer install
Download the files and include autoload.php:
<?php
require_once('/path/to/IONOSMailConfigurationHandler/vendor/autoload.php');Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = IONOS\MailConfigurationAPI\Client\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new IONOS\MailConfigurationAPI\Client\Api\MailConfigurationAPIApi(
// 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
);
$brand = 'brand_example'; // string
$extRef = 'extRef_example'; // string
$mailCreateData = new \IONOS\MailConfigurationAPI\Client\Model\MailCreateData(); // \IONOS\MailConfigurationAPI\Client\Model\MailCreateData
try {
$result = $apiInstance->createMailbox($brand, $extRef, $mailCreateData);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling MailConfigurationAPIApi->createMailbox: ', $e->getMessage(), PHP_EOL;
}All URIs are relative to https://API_HOST/nextcloud
| Class | Method | HTTP request | Description |
|---|---|---|---|
| MailConfigurationAPIApi | createMailbox | POST /addons/{brand}/{extRef}/mail | Creates a mailbox on IONOS plattform that is used for nextcloud user |
| MailConfigurationAPIApi | deleteAppPassword | DELETE /addons/{brand}/{extRef}/mail/{nextcloudUserId}/apppwd/{appname} | Deletes the app credentials for the given appname |
| MailConfigurationAPIApi | deleteMailbox | DELETE /addons/{brand}/{extRef}/mail/{nextcloudUserId} | Deletes mailbox for given nextcloud user |
| MailConfigurationAPIApi | getAllFunctionalAccounts | GET /addons/{brand}/{extRef}/mail | Returns all functional mailboxes for the given brand and extRef |
| MailConfigurationAPIApi | getFunctionalAccount | GET /addons/{brand}/{extRef}/mail/{nextcloudUserId} | Returns all functional mailboxes for the given brand and extRef |
| MailConfigurationAPIApi | patchMailbox | PATCH /addons/{brand}/{extRef}/mail/{nextcloudUserId} | update maildata |
| MailConfigurationAPIApi | setAppPassword | POST /addons/{brand}/{extRef}/mail/{nextcloudUserId}/apppwd/{appname} | A new password for provided appname will be set and returned |
- Imap
- MailAccountCreatedResponse
- MailAccountResponse
- MailAddonErrorMessage
- MailCreateData
- MailServer
- PatchMailRequest
- Smtp
Authentication schemes defined for the API:
- Type: HTTP basic authentication
To run the tests, use:
composer install
vendor/bin/phpunitThis PHP package is automatically generated by the OpenAPI Generator project:
- API version:
2.0.0-20251208083401- Generator version:
7.14.0
- Generator version:
- Build package:
org.openapitools.codegen.languages.PhpClientCodegen