Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

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.

Email Creation Through URL

Discussion in 'cPanel Developers' started by Taylan, Feb 9, 2018.

Tags:
  1. Taylan

    Taylan Registered

    Joined:
    Feb 7, 2018
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Australia
    cPanel Access Level:
    Reseller Owner
    I'm trying to create emails automatically on signup for users. I'm trying to achieve this through the URL below but it's saying 'Invalid Security Token'. I have WHM and an API token, just wondering on how to achieve it.

    Code:
    http://[cpanel user]:[cpanel pass]@example.com.au:2082/frontend/paper_lantern/mail/doaddpop.html?email=$euser&domain=$edomain&password=$epass&quota=1024
    Or is there another way to create email accounts?
     
    #1 Taylan, Feb 9, 2018
    Last edited by a moderator: Feb 9, 2018
  2. Dave Smith

    Dave Smith Active Member

    Joined:
    Mar 20, 2016
    Messages:
    37
    Likes Received:
    9
    Trophy Points:
    8
    Location:
    Lisbon
    cPanel Access Level:
    Root Administrator
    Try the attached files. This worked for us a while back. There are probably some updates available.

    Hope it helps.

    - Removed -
     
    #2 Dave Smith, Feb 10, 2018
    Last edited by a moderator: Feb 10, 2018
  3. Dave Smith

    Dave Smith Active Member

    Joined:
    Mar 20, 2016
    Messages:
    37
    Likes Received:
    9
    Trophy Points:
    8
    Location:
    Lisbon
    cPanel Access Level:
    Root Administrator
    I don't understand why the files were removed? They were not malicious, dangerous, or infringing on any copyright?
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    15,993
    Likes Received:
    339
    Trophy Points:
    433
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    There should be no need to post a zip file to answer a question about an API call not working properly.
     
  5. Dave Smith

    Dave Smith Active Member

    Joined:
    Mar 20, 2016
    Messages:
    37
    Likes Received:
    9
    Trophy Points:
    8
    Location:
    Lisbon
    cPanel Access Level:
    Root Administrator
    The forum would not allow me to post the full PHP code Infopro, so I figured the next best thing was to upload the PHP files. Maybe consider disabling file uploads for .zip files on the forum if it is an issue...?

    Thank you for the answer at least.
     
  6. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    15,993
    Likes Received:
    339
    Trophy Points:
    433
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Thanks for your feedback.

    I'm not sure what issue you had posting some php code in php code tags, but it should work fine. If needed.
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    41,396
    Likes Received:
    1,606
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    The following UAPI function is available if you want to create email accounts via the command line or through a custom application:

    UAPI Functions - Email::add_pop - Software Development Kit - cPanel Documentation

    @Dave Smith, would you mind posting the script example in CODE tags and let us know if it still fails? If so, feel free to send me a private message with a link to the file and I'll update your earlier response to include the code.

    Thanks!
     
Loading...

Share This Page