Skip to content

IONOS-Productivity/ionos-mail-configuration-api-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IONOSMailConfigurationHandler

This is the API client for the Mail Configuration API

Installation & Usage

Requirements

PHP 8.1 and later.

Composer

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

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/IONOSMailConfigurationHandler/vendor/autoload.php');

Getting Started

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;
}

API Endpoints

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

Models

Authorization

Authentication schemes defined for the API:

basicAuth

  • Type: HTTP basic authentication

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: 2.0.0-20251208083401
    • Generator version: 7.14.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published