Hi guys, i use this part of a class to connect to zimbra, but it always report an error... i try zmsoap to check soap is working ok and it works on localhost where the server is... but when we execute this class to connect to https://domain:7071/service/admin/soap it says can't connect to sever.
Any ideas?

Here's the code (extract of a functionally joomla integration for zimbra) :

class zimbraAdmin {
public $soapheader;
public $zimbra_error;
public $zimbra_errno;
public $zimbra_session;
public $zimbra_auth;
public $curlhandle;

public function zimbraAdmin($server) {

$this->curlhandle = curl_init();
curl_setopt($this->curlhandle, CURLOPT_URL, "https://$server:7071/service/admin/soap");
curl_setopt($this->curlhandle, CURLOPT_POST, TRUE);
curl_setopt($this->curlhandle, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($this->curlhandle, CURLOPT_SSL_VERIFYPEER, TRUE);
curl_setopt($this->curlhandle, CURLOPT_SSL_VERIFYHOST, TRUE);

}

public function set_zimbra_header() {
$this->soapheader = '<soap:Envelope
xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Header>
<context xmlns="urn:zimbra"';
if ($this->zimbra_session != 0)
$this->soapheader .= '>
<authToken>' . $this->zimbra_auth . '</authToken>
<sessionId id="' . $this->zimbra_session . '">' . $this->zimbra_session . '</sessionId>
</context>';
else
$this->soapheader .= '/>';
$this->soapheader .= '
</soap:Header>
<soap:Body>
';
}

public function zimbra_login($adminuser, $adminpass)
{

$xml = new xml2Array();
$this->set_zimbra_header();
$soapmessage = $this->soapheader . '
<AuthRequest xmlns="urn:zimbraAdmin">
<name>' . $adminuser . '</name>
<password>' . $adminpass . '</password>
</AuthRequest>
</soap:Body>
</soap:Envelope>';
curl_setopt($this->curlhandle, CURLOPT_POSTFIELDS, $soapmessage);
if (!($zimbraSOAPResponse = curl_exec($this->curlhandle)))
{
$this->zimbraerrno = curl_errno($this->curlhandle);
$this->zimbraerror = curl_error($this->curlhandle);
return false;
}

$res = $xml->parse($zimbraSOAPResponse);
if (! isset($res['SOAP:ENVELOPE']['SOAP:BODY']['AUTHRESPONSE']))
return false;
$x = $res['SOAP:ENVELOPE']['SOAP:BODY']['AUTHRESPONSE'];
$this->zimbra_session = $x['SESSIONID']['DATA'];
$this->zimbra_auth = $x['AUTHTOKEN']['DATA'];

return true;
}
}

$obj = new zimbraAdmin('192.123.321.1');
$obj->zimbra_login('admin@domain','pass');
print_r($obj);

Any comments would be apreciated