-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsoap-transport-update.php
More file actions
44 lines (27 loc) · 933 Bytes
/
soap-transport-update.php
File metadata and controls
44 lines (27 loc) · 933 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
$username = 'admin';
$password = 'admin';
$soap_location = 'http://localhost:8080/remote/index.php';
$soap_uri = 'http://localhost:8080/remote/';
$client = new SoapClient(null, array('location' => $soap_location,
'uri' => $soap_uri));
try {
if($session_id = $client->login($username,$password)) {
echo 'Zalogowany. Sesja:'.$session_id.'<br />';
}
//transport -> typ:[adres@email] - jeśli z klamrą to włączona opcja brak mx
$params = array( 'server_id' => 1,
'domain' => 'replikant.eu',
'transport' => 'uucp:[arian@replikant.eu]',
'sort_order' => '5',
'active' => 'y');
$client_id = 0;
$mailuser_id = 1;
$domain_id = $client->mail_transport_update($session_id, $mailuser_id, $client_id, $params);
if($client->logout($session_id)) {
echo 'Wylogowany.<br />';
}
} catch (SoapFault $e) {
die('SOAP Blad: '.$e->getMessage());
}
?>