The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SOLVED Automated email generation script issue

Discussion in 'cPanel Developers' started by Jeff P., Nov 28, 2016.

Tags:
  1. Jeff P.

    Jeff P. Active Member

    Joined:
    Feb 2, 2016
    Messages:
    30
    Likes Received:
    6
    Trophy Points:
    8
    Location:
    Palm Coast, Fl
    cPanel Access Level:
    DataCenter Provider
    Anyone see why this would stop working? It's returning false and nothing else too.

    function makeemail1($domain,$account) {
    global $root_pass,$ip;
    $xmlapi = new xmlapi($ip);
    $xmlapi->set_port(2082);
    $xmlapi->password_auth($account,'xxxxxxxxxx');
    $call = array('domain'=>$domain, 'email'=>'abuse@'.$domain,'password'=>'xxxxxxxxxx', 'quota'=>'200');
    return $xmlapi->api2_query($account, "Email", "addpop", $call);
    }
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,287
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    The "email" parameter should be 'abuse' in your example. Per the Email::addpop document:

    Thank you.
     
  3. Jeff P.

    Jeff P. Active Member

    Joined:
    Feb 2, 2016
    Messages:
    30
    Likes Received:
    6
    Trophy Points:
    8
    Location:
    Palm Coast, Fl
    cPanel Access Level:
    DataCenter Provider
    Ah new it would be something tiny. So just the username and not full email. Thanks.
     
    cPanelMichael likes this.
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,287
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    That's correct.

    Thanks!
     
Loading...

Share This Page