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?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---