# Fortnox\FortnoxTrustedEmailSendersApi



All URIs are relative to https://api.fortnox.se, except if the operation defines another base path.

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**emailSenderControllerDoIndex()**](FortnoxTrustedEmailSendersApi.md#emailSenderControllerDoIndex) | **GET** /3/emailsenders | Retrieve a list of all trusted and rejected senders |
| [**emailSenderControllerDoTrustedDeleteWithId()**](FortnoxTrustedEmailSendersApi.md#emailSenderControllerDoTrustedDeleteWithId) | **DELETE** /3/emailsenders/trusted/{Id} | Delete an email address from the trusted senders list |
| [**emailSenderControllerDoTrustedPostDefault()**](FortnoxTrustedEmailSendersApi.md#emailSenderControllerDoTrustedPostDefault) | **POST** /3/emailsenders/trusted | Add a new email address as trusted |


## `emailSenderControllerDoIndex()`

```php
emailSenderControllerDoIndex(): \Fortnox\Model\FortnoxDaEmailSendersWrap
```

Retrieve a list of all trusted and rejected senders

Get email senders

### Example

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



$apiInstance = new Fortnox\Api\FortnoxTrustedEmailSendersApi(
    // 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()
);

try {
    $result = $apiInstance->emailSenderControllerDoIndex();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FortnoxTrustedEmailSendersApi->emailSenderControllerDoIndex: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

This endpoint does not need any parameter.

### Return type

[**\Fortnox\Model\FortnoxDaEmailSendersWrap**](../Model/FortnoxDaEmailSendersWrap.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `emailSenderControllerDoTrustedDeleteWithId()`

```php
emailSenderControllerDoTrustedDeleteWithId($id)
```

Delete an email address from the trusted senders list

Provide an id matching an email to delete.

### Example

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



$apiInstance = new Fortnox\Api\FortnoxTrustedEmailSendersApi(
    // 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()
);
$id = 56; // int | identifies the trusted email sender to delete

try {
    $apiInstance->emailSenderControllerDoTrustedDeleteWithId($id);
} catch (Exception $e) {
    echo 'Exception when calling FortnoxTrustedEmailSendersApi->emailSenderControllerDoTrustedDeleteWithId: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **int**| identifies the trusted email sender to delete | |

### Return type

void (empty response body)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `emailSenderControllerDoTrustedPostDefault()`

```php
emailSenderControllerDoTrustedPostDefault($trusted_email_sender): \Fortnox\Model\FortnoxDaEmailSenderTrustedWrap
```

Add a new email address as trusted

Update an email sender

### Example

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



$apiInstance = new Fortnox\Api\FortnoxTrustedEmailSendersApi(
    // 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()
);
$trusted_email_sender = new \Fortnox\Model\FortnoxDaEmailSenderTrustedWrap(); // \Fortnox\Model\FortnoxDaEmailSenderTrustedWrap | Request body for update email sender

try {
    $result = $apiInstance->emailSenderControllerDoTrustedPostDefault($trusted_email_sender);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FortnoxTrustedEmailSendersApi->emailSenderControllerDoTrustedPostDefault: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **trusted_email_sender** | [**\Fortnox\Model\FortnoxDaEmailSenderTrustedWrap**](../Model/FortnoxDaEmailSenderTrustedWrap.md)| Request body for update email sender | [optional] |

### Return type

[**\Fortnox\Model\FortnoxDaEmailSenderTrustedWrap**](../Model/FortnoxDaEmailSenderTrustedWrap.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
