|
| 1 | +<?php |
| 2 | +# Copyright (c) 2009, cPanel, Inc. |
| 3 | +# All rights reserved. |
| 4 | +# |
| 5 | +# Redistribution and use in source and binary forms, with or without modification, are permitted provided |
| 6 | +# that the following conditions are met: |
| 7 | +# |
| 8 | +# * Redistributions of source code must retain the above copyright notice, this list of conditions and the |
| 9 | +# following disclaimer. |
| 10 | +# * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the |
| 11 | +# following disclaimer in the documentation and/or other materials provided with the distribution. |
| 12 | +# * Neither the name of the cPanel, Inc. nor the names of its contributors may be used to endorse or promote |
| 13 | +# products derived from this software without specific prior written permission. |
| 14 | +# |
| 15 | +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED |
| 16 | +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A |
| 17 | +# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR |
| 18 | +# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED |
| 19 | +# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 20 | +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
| 21 | +# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 22 | +# POSSIBILITY OF SUCH DAMAGE. |
| 23 | + |
| 24 | +include("../xmlapi.php"); |
| 25 | + |
| 26 | +$ip = getenv('REMOTE_HOST'); |
| 27 | +$root_pass = getenv('REMOTE_PASSWORD'); |
| 28 | + |
| 29 | +$account = "cptest"; |
| 30 | +$email_user = "somerandomuser"; |
| 31 | +$email_password = "adfm90f1m3f0m0adf"; |
| 32 | +$email_domain = "somedomain.com"; |
| 33 | +$email_query = '10'; |
| 34 | + |
| 35 | +$xmlapi = new xmlapi($ip); |
| 36 | +$xmlapi->password_auth("root",$root_pass); |
| 37 | +$xmlapi->set_output('json'); |
| 38 | + |
| 39 | +$xmlapi->set_debug(1); |
| 40 | +print $xmlapi->api1_query($account, "Email", "addpop", array($email_user, $email_password, $email_quota, $email_domain) ); |
| 41 | + |
| 42 | + |
| 43 | +?> |
0 commit comments