User name when using SMxxxx API

Discussion in 'Control Panel API' started by Xerxes, Feb 29, 2016.

  1. I am testing some of the Smarter Mail APIs and not sure what to enter for user name.
    For example, if I want to delete a user, (assuming user's email address is john.doe@domain_name.com) if I enter email address as user id (which is what is used when accessing Smarter Mail) it says "invalid user name". If I enter just john.doe it doesn't return anything.
    Same thing when adding a new SM user: I can specify first name and last name, but how's the email address created if there is no field to specify it?
    This is what I get when trying to add a user "John Doe":
    Dasp.CustomerAPI.Web.UserErrorException: UserName '[email protected]' is invalid.
    I am using the sandbox key to test it in a browser.
     
  2. Never mind, I got it! I tested it using production key and confirmed the email was created. However, since there is no return value from SMAddUser, I am not sure how to check if the email was successfully created or not.
    That's why when entered "john.doe" as user name (which was correct) nothing was returned. Is there some way of confirming if the email account was created or not?

    Another question: is it possible to get mailbox space used by a given user? I can get each user's mailbox size but not how much is used/left.
     
    Last edited: Mar 2, 2016
  3. Any type of response is much appreciated!
     
  4. mjp

    mjp

    I doubt it's available via API, since it's already kind of buried in the reports.

    We may revisit and update the Control Panel API at some point, but there aren't currently any plans to do that, mainly because the API gets very little use. We all thought it was a great idea when we launched it, but it was met with a rousing indifference. ;)
     
  5. Thank you. I love the APIs for what its worth.
    How about first part of my question: when you add a new email account, is there a return value that lets you know if the process was successful or not?
     
  6. FrankC

    FrankC DiscountASP.NET Staff

    No. The method doesn't return anything. If there's an error, it will throw an exception.
    Sorry that's not exposed yet due to some performance issues.
     
  7. Thank you.
     

Share This Page