update_mailaccount()
Update a mail account.
Signature
update_mailaccount(array $parameters): mixedParameters
Pass these parameters as KasRequestParams. Every request also requires kas_login, kas_auth_type, and kas_auth_data, as shown in SOAP with PHP.
| Name | Description | Requirement |
|---|---|---|
mail_login |
The login to update | Required |
mail_new_password |
The new mailbox password | Optional |
webmail_autologin |
Automatic login from the KAS to webmail: Y|N |
Optional
Default: Y
|
responder |
Autoresponder: N|Y or start|end, with start and end as timestamps separated by "|" | Optional |
mail_responder_frequency |
Block interval per identical sender in days (0 to 4294967295); 0 answers every email | Optional |
mail_responder_content_type |
The content type of the autoresponder text: html|text | Optional |
mail_responder_displayname |
The sender display name of the autoresponder, e.g. "John Doe autoresponder" | Optional |
responder_text |
The autoresponder text | Optional |
copy_adress |
The copy recipient addresses, RFC 2822; separate multiple addresses with commas | Optional |
is_active |
The mailbox is active: Y|N|forbidden; N stops incoming mail, but retrieval is still possible | Optional |
mail_sender_alias |
Allowed alias addresses that can be used as the FROM address | Optional |
mail_xlist_enabled |
XLIST is active: Y|N | Optional |
mail_xlist_sent |
XLIST name of the sent items folder | Optional |
mail_xlist_drafts |
XLIST name of the drafts folder | Optional |
mail_xlist_trash |
XLIST name of the trash folder | Optional |
mail_xlist_spam |
XLIST name of the spam folder | Optional |
mail_xlist_archiv |
XLIST name of the archive folder | Optional |
mail_allow_nets |
Allow access only for specific clients (optional, e.g. 1.2.3.4, 12.34.0.0/16, webmail) | Optional |
PHP example
<?php
// $sessionToken is returned by KasAuth, see SOAP with PHP.
$parameters = [
'mail_login' => 'm0123456',
'mail_new_password' => 'password',
'responder' => '1230764400|1293836400',
'responder_text' => 'I am on vacation from 01.01.2008 to 01.01.2011',
'copy_adress' => 'copy@example.com',
'is_active' => 'Y',
'mail_sender_alias' => 'alias@example.org',
];
try {
$client = new SoapClient('https://kasapi.kasserver.com/soap/wsdl/KasApi.wsdl');
$response = $client->KasApi(json_encode([
'kas_login' => 'w0123456',
'kas_auth_type' => 'session',
'kas_auth_data' => $sessionToken,
'kas_action' => 'update_mailaccount',
'KasRequestParams' => $parameters,
]));
print_r($response);
} catch (SoapFault $fault) {
echo 'Error: ' . $fault->faultstring;
}
Responses and error codes
-
TRUEthe action was carried out -
missing_parametera required parameter is missing -
in_progressthe KAS object is currently being processed -
nothing_to_donothing was changed -
copy_adress_like_mailaccount -
copy_adress_syntax_incorrect -
email_already_exists -
email_domain_doesnt_exist -
mail_loop_detected -
is_active_syntax_incorrect -
mail_login_not_found -
max_sender_alias_reached -
password_syntax_incorrect -
responder_contentype_syntax_incorrect -
responder_displayname_syntax_incorrect -
responder_not_allowed_for_catchall_adresses -
responder_frequency_syntax_incorrect -
responder_startdate_gt_enddate -
responder_syntax_incorrect -
responder_text_is_empty -
sender_alias_domain_in_kas -
sender_alias_syntax_incorrect -
mail_xlist_enabled_syntax_incorrect -
mail_xlist_sent_syntax_incorrect -
mail_xlist_drafts_syntax_incorrect -
mail_xlist_trash_syntax_incorrect -
mail_xlist_spam_syntax_incorrect -
mail_xlist_archiv_syntax_incorrect -
mail_xlist_duplicate_folder -
webmail_autologin_syntax_incorrect -
webmail_autologin_change_requires_new_password