HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Developers' Forum (http://www.howtoforge.com/forums/forumdisplay.php?f=33)
-   -   mail_domain_get_by_domain doesn't get the email. (http://www.howtoforge.com/forums/showthread.php?t=54499)

vaio1 11th October 2011 13:25

mail_domain_get_by_domain doesn't get the email.
 
Hi guys,

we are connect our software with ISPConfig but we get some difficulties in order to get the list of the email addess set in the ISPConfig by SOAP.

After the soap connection we call this method:

$mails = $client->mail_domain_get_by_domain ( $this->getSession (), "ourdomain.com" );

ourdomain.com is already set in the ISPConfig panel and work as well but the result of the call is empty. Why?!

thanks

till 11th October 2011 13:29

Which ISPConfig version do you use for development? There was a bug in this function in the api in 3.0.3.3. which has been fixed in 3.0.4 beta.

vaio1 11th October 2011 13:38

The quotes have been added in you code. The result is the same. Does we have to connect to the mailserver?

We have the ispconfig 3 multiserver with the configuration

till 11th October 2011 13:50

Connections are always done to the master server.

The changes were not about quotes, the changes were in the variable name. The function in 3.0.4 has been tested last week successfully. The function in 3.0.3.3 is broken.

vaio1 11th October 2011 13:53

Yes, i forgot to write in the last post that i have changed the domain var from domain_id to domain too.

Any idea?

till 11th October 2011 13:56

You can debug the function by returning the sql query that is used to get the domain as soap error and then try this query in the ispconfig database of the master with phpmyadmin to see if it return the correct results.

vaio1 11th October 2011 14:28

this is the result in MySQL. The SOAP request is empty.

Code:

mysql> SELECT * FROM mail_domain WHERE domain = 'ourdomain.com';
+-----------+------------+-------------+---------------+----------------+----------------+-----------+-------------------+--------+
| domain_id | sys_userid | sys_groupid | sys_perm_user | sys_perm_group | sys_perm_other | server_id | domain            | active |
+-----------+------------+-------------+---------------+----------------+----------------+-----------+-------------------+--------+
|        3 |          1 |          4 | riud          | ru            |                |        3 | ourdomain.com | y      |
+-----------+------------+-------------+---------------+----------------+----------------+-----------+-------------------+--------+


till 11th October 2011 14:59

How did you check if its empty? The functions returns a two dimensional arry, not a one dimensional array. Please use the print_r() function to display the output that you received from the remote script.

vaio1 11th October 2011 15:34

I have printed the value using the print_r() function but the result is an bool(false)

till 11th October 2011 15:54

Then you might have to try to debug your code, you should also check if you enabled thsi function for the remote user that you use to conect to ispconfig. We had tested this function a few days ago here and it worked, so I'am sure that the code in 3.0.4 is ok.


All times are GMT +2. The time now is 00:03.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.