Hi,

If you get errors, you should keep track on your code of the
operations that are not successful, then retry them and if the problem
persists we can check them in more detail. Also, try to slow the
update rate to see if that helps to reduce the number of errors.

Thanks,
-Julian

On Feb 13, 7:40 pm, NCCFred <[email protected]> wrote:
> Hi Julian,
>
> I have another question for you concerning this.
>
> I'm in the process of updating all 22,000+ accounts in my domain using
> the CreateSendAs function.  After this function returns data I'm
> displaying it to the screen so I can see the progression of things.
> Unfortunately sometimes it returns Error Code 1000, which is
> "Unknown".  I'm wondering what could I do with the API to make sure
> I've hit every account with this function (I'd like to see what
> accounts missed this, if any).  I'm looking through the
> GoogleMailSettingsService Class but nothing is that clear.
>
> On Feb 12, 2:45 pm, NCCFred <[email protected]> wrote:
>
> > Hi Julian,
>
> > I had to add another thing to your code because of type a mismatch,
> > see below.
> > Beside that, it's working, Thank You!
>
> > GoogleMailSettingsEntry returnVal = SettingsObj.CreateSendAs(accounts
> > [i].ToString(), "", " ", " ", "true");
>
> > Console.WriteLine("Address: " + returnVal.getPropertyByName
> > ("address").Value);
> > Console.WriteLine("Name: " + returnVal.getPropertyByName
> > ("name").Value);
> > Console.WriteLine("Default: " + returnVal.getPropertyByName
> > ("makeDefault").Value);
>
> > On Feb 12, 1:37 pm, NCCFred <[email protected]> wrote:
>
> > > Thanks Julian, i'm going to play with this now and report back.
>
> > > On Feb 12, 12:48 pm, "Julian (Google)" <[email protected]> wrote:
>
> > > > Hi,
>
> > > > You can catch a GDataRequestException to look for errors, also you can
> > > > read the values from just created GoogleMailSettingsEntry to double
> > > > check if the operation was completed successfully, for example:
>
> > > > try {
>
> > > >   GoogleMailSettingsEntry gmse = service.CreateSendAs("username",
> > > > "name", "[email protected]", "", "");
> > > >   // you can compare the following to make sure the action was
> > > > completed: gmse.getPropetyValueByName("address") == [email protected]
>
> > > > } catch (GDataRequestException gDataRequestException){
>
> > > >   // you can check this XML string for error messages:
> > > > gDataRequestException.ResponseString;
>
> > > > }
>
> > > > You can also check other Property values for example: makeDefault or
> > > > name.
>
> > > > Cheers,
> > > > Julian.
>
> > > > On Feb 12, 1:47 am, NCCFred <[email protected]> wrote:
>
> > > > > Hello Group,
>
> > > > > I'm in the process of creating another "SendAs" address.  My issue is
> > > > > I'd like to know what I could grab from CreateSendAs function to make
> > > > > sure it completed successfully.  The CreateSendAs returns a
> > > > > GoogleMailSettingsEntry Object.
>
> > > > > Here's a quick run down of my code (from memory):
>
> > > > > using Google.GData.Apps.GoogleMailSettings;
> > > > > using Google.GData.Apps;
>
> > > > > GoogleMailSettingsService serviceObj = new GoogleMailSettingsService
> > > > > ("domain", "app-name");
>
> > > > > serviceObj.setUserCredentials("username", "password");
> > > > > string token = service.QueryAuthenticationToken();
> > > > > serviceObj.SetAuthenticationToken(token);
>
> > > > > // CreateSendAs alias
> > > > > //
> > > > > GoogleMailSettingsEntry settingsObj = serviceObj.CreateSendAs
> > > > > ("username", "first last", "address", "replyto", "true");
>
> > > > > I know from my test and looking at a test user's account in the GUI
> > > > > that everything goes well, but I'd like to see what I could pull from
> > > > > the "settingsObj" to check and see what got returned.  The only thing
> > > > > I came up with was to pull the  settingsObj.Updated.ToLongDateString
> > > > > (), but I'd like something more concrete than that - any ideas?- Hide 
> > > > > quoted text -
>
> > > > - Show quoted text -- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Apps APIs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-apps-apis?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to