Skip to main content

Look up email accounts using php code or API?

Comments

6 comments

  • cPanelLauren
    Hi @JohnDavid What are you trying to do exactly? That might help in getting you a better API function. There is the WHMAPI 1 function list_pops_for which will list email accounts on a specific account WHM API 1 Functions - list_pops_for - Developer Documentation - cPanel Documentation Thanks!
    0
  • JohnDavid
    Hi @cPanelLauren Thank you for the response! What i just want is to look up all email accounts for a domain using DOMAIN. Yes i have just checked the WHMAPI 1 function list_pops_for but parameter you need for this is "user" i am right? Example: In the text box if i input the domain(example.com) then all the email accounts on domain(@example.com) will be listed. Sorry I'm just learning php and not much knowledgeable for complex PHP. Thank you, please guide me how to achieve this.
    0
  • Infopro
    You may find this helpful: cPanel App Catalog :: ConfigServer Mail Manage
    0
  • cPanelLauren
    Hi @JohnDavid You might also find the UAPI here UAPI Functions - Email::list_pops - Developer Documentation - cPanel Documentation helpful. Though it'd have to be run per user it does give accounts per domain. I ran it as follows: uapi --user=$user Email list_pops regex=$domain.tld
    0
  • JohnDavid
    Thank you @Infopro but i like to create a php code for this because i have bunch process needs to test. Thank you @cPanelLauren but any API that we can use $domain as variable or parameter to use to list all email accounts for the domain? Or any way to to query $domain and list all email accounts?
    0
  • cPanelLauren
    There's no API function that can do just that for ALL accounts on the server but I did find the following thread which might be helpful: Thanks!
    0

Please sign in to leave a comment.