hi,
i am using email settings API (.NET client library) and trying to
update the forwarding address of user. i am using the following code:
GoogleMailSettingsService settingsService = new
GoogleMailSettingsService(_domain, _myApp);
settingsService.setUserCredentials(_adminEmailAddress,
_adminPassword);
settingsService.UpdateForwarding(_userName, "true", forwardingAddress,
"KEEP");
but i am getting following exception:
Google.GData.Client.GDataRequestException: Execution of request
failed:
https://apps-apis.google.com/a/feeds/emailsettings/2.0/mydomain/myusername/forwarding
---> System.Net.WebException: The remote server returned an error:
(500) Internal Server Error.
at System.Net.HttpWebRequest.GetResponse()
at Google.GData.Client.GDataRequest.Execute()
--- End of inner exception stack trace ---
at Google.GData.Client.GDataRequest.Execute()
at Google.GData.Client.GDataGAuthRequest.Execute(Int32
retryCounter)
at Google.GData.Client.GDataGAuthRequest.Execute()
at Google.GData.Client.Service.EntrySend(Uri feedUri, AtomBase
baseEntry, GDataRequestType type, AsyncSendData data)
at Google.GData.Client.Service.Update(AtomEntry entry,
AsyncSendData data)
at Google.GData.Client.Service.Update(AtomEntry entry)
at
Google.GData.Apps.GoogleMailSettings.GoogleMailSettingsService.UpdateForwarding
(String userName, String enable, String forwardTo, String action)
please note that this used to work before.
also i am using the code below to clear the forwarding address and it
is working without any problem.
GoogleMailSettingsService settingsService = new
GoogleMailSettingsService(_domain, _myApp);
settingsService.setUserCredentials(_adminEmailAddress,
_adminPassword);
settingsService.UpdateForwarding(_userName, "false", string.Empty,
"KEEP");