src/Api/Domain.php
public function updateCredential(string $domain, string $login, string $pass)
    {
        Assert::stringNotEmpty($domain);
        Assert::stringNotEmpty($login);
        Assert::stringNotEmpty($pass);
        Assert::lengthBetween($pass, 5, 32, 'SMTP password must be between 5 and 32 characters.');

        $params = [
            'password' => $pass,
        ];

        $response = $this->httpPut(sprintf('/v3/domains/%s/credentials/%s', $domain, $login), $params);

        return $this->hydrateResponse($response, UpdateCredentialResponse::class);
    }
public function updateCredential(string $domain, string $login, string $pass)
    {
        Assert::stringNotEmpty($domain);
        Assert::stringNotEmpty($login);
        Assert::stringNotEmpty($pass);
        Assert::lengthBetween($pass, 5, 32, 'SMTP password must be between 5 and 32 characters.');

        $params = [
            'password' => $pass,
        ];

        $response = $this->httpPut(sprintf('/v3/domains/%s/credentials/%s', $domain, $login), $params);

        return $this->hydrateResponse($response, UpdateCredentialResponse::class);
    }
public function updateCredential ( string $ domain , string $ login , string $ pass ) { Assert :: stringNotEmpty ( $ domain ) ; Assert :: stringNotEmpty ( $ login ) ; Assert :: stringNotEmpty ( $ pass ) ; Assert :: lengthBetween ( $ pass , 5 , 32 , 'SMTP password must be between 5 and 32 characters.' ) ; $ params = [ 'password' => $ pass , ] ; $ response = $ this -> httpPut ( sprintf ( '/v3/domains/%s/credentials/%s' , $ domain , $ login ) , $ params ) ; return $ this -> hydrateResponse ( $ response , UpdateCredentialResponse :: class ) ; }
Update a set of SMTP credentials for the specified domain.

@param string $domain name of the domain
@param string $login  SMTP Username
@param string $pass   New SMTP Password. Length min 5, max 32.

@return UpdateCredentialResponse|array|ResponseInterface
Update a set of SMTP credentials for the specified domain .