Update a mail setting of a Project
PUT/projects/ {projectId}/ mail-settings/ {mailSetting}/ 
v2
PUT
deprecated-mail-update-project-mail-setting
This operation is deprecated. Use the PATCH v2/{projectId}/mail-settings/{mailSetting} endpoint instead.
Request
Responses
Usage examples
- cURL
 - JavaScript SDK
 - PHP SDK
 
$ curl \
    --fail \
    --location \
    -X PUT \
    -d '{"blacklist":["email@mittwald.example"]}' \
    -H "Authorization: Bearer $MITTWALD_API_TOKEN" \
    -H 'Content-Type: application/json' \
    https://api.mittwald.de/v2/projects/string/mail-settings/blacklist
import { MittwaldAPIV2Client } from "@mittwald/api-client";
import { assertStatus } from "@mittwald/api-client-commons";
  
const client = MittwaldAPIClient.newWithToken(process.env.MITTWALD_API_TOKEN);
const response = await client.mail.deprecatedMailUpdateProjectMailSetting({
  "projectId": "string",
  "mailSetting": "blacklist",
  "data": {
    "blacklist": [
      "email@mittwald.example"
    ]
  }
});
assertStatus(response, 200);
  
use \Mittwald\ApiClient\Generated\V2\Clients\Mail\DeprecatedMailUpdateProjectMailSetting\DeprecatedMailUpdateProjectMailSettingRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\Mail\DeprecatedMailUpdateProjectMailSetting\DeprecatedMailUpdateProjectMailSettingRequestBody;
  
$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));
// TODO: Please consult the properties and constructor signature of
// DeprecatedMailUpdateProjectMailSettingRequestBody to learn how to construct a valid instance
$body = new DeprecatedMailUpdateProjectMailSettingRequestBody(/* TODO: ... */);
$request = (new DeprecatedMailUpdateProjectMailSettingRequest(
  projectId: "string",
  mailSetting: "blacklist",
  body: $body
));
$response = $client->mail()->deprecatedMailUpdateProjectMailSetting($request);
var_dump($response->getBody();