Google API -> Forwarding

65 views
Skip to first unread message

Hugo

unread,
Feb 16, 2012, 8:47:12 AM2/16/12
to google-app...@googlegroups.com
Hello,
I am helping a university to use Google Apps for Education.
 
The university would like to send email to students (e-mail domain of the university), but wish it had a redirect if the student has another email.

For example, I provide my information the university (including my e-mail) and when the university to create the e-mail in Google Apps will add in redirecting my email (which informed). 
So I have two e-mail: hu...@universidade.com and hu...@gmail.com
When the university to send an email to hu...@universidade.com, they want to redicionar hu...@gmail.com

I'm using the Google API. NET. The sample code is this:

GoogleMailSettingsService GoogleMailSettingsService mail = new ("xxx", "appsXXX");
mail.setUserCredentials ("x...@XXXX.com", "y") / / email and password Administrator

mail.UpdateForwarding ("Hugo", "true", "hu...@gmail.com", "KEEP");

The following error occurs:

<? xml version = "1.0" encoding = "UTF-8"?>
<AppsForYourDomainErrors>
   <error errorCode="1303" invalidInput="hu...@gmail.com" reason="EntityNameNotValid" />
</ AppsForYourDomainErrors>

I know that the student can enter the e-mail and do the redirection, but the university wants to do this automatically.
How can I solve this problem? Does anyone have another suggestion?

Brian Mcnamara

unread,
Feb 16, 2012, 9:11:25 AM2/16/12
to google-app...@googlegroups.com
Hi Hugo,

I don't believe this is possible with the Email Settings API.  There are several restrictions:

Note: A valid value of forwardTo is an email address that has been already verified to be used as a forwarding address in the Google Mail account, or one that fulfills one of the following criteria:

1. It belongs to the same domain,
2. It belongs to a subdomain of the same domain, or
3. It belongs to a domain alias configured as part of the same Google Apps account.

If the value of forwardTo doesn't adhere to one of these rules, setting up forwarding via the API will fail.


Please refer to http://code.google.com/googleapps/domain/email_settings/developers_guide_protocol.html#GA_email_forwarding_main for more information.

Regards,
Brian

Brian McNamara, Certified Google Apps Deployment Specialist


--
You received this message because you are subscribed to the Google Groups "Google Apps Domain Information and Management APIs" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-apps-mgmt-apis/-/RWpDLaRk1wMJ.
To post to this group, send email to google-app...@googlegroups.com.
To unsubscribe from this group, send email to google-apps-mgmt...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-apps-mgmt-apis?hl=en.

Hugo

unread,
Feb 16, 2012, 9:17:48 AM2/16/12
to google-app...@googlegroups.com
These restrictions are only for use GOOGLE API?
Because if it "manually" I can redirect e-mail (hugo@university) to another e-mail(hu...@xxxx.net

Thanks

Brian Mcnamara

unread,
Feb 16, 2012, 9:25:16 AM2/16/12
to google-app...@googlegroups.com
Hi Hugo,

I believe that to be true.  We've seen the same behavior in other applications we've developed for clients.


Regards,
Brian

Brian McNamara, Certified Google Apps Deployment Specialist
LTech | bmcn...@ltech.com | 908-566-1728 | Google Voice 908-505-5155



--
You received this message because you are subscribed to the Google Groups "Google Apps Domain Information and Management APIs" group.

Hugo

unread,
Feb 16, 2012, 9:33:03 AM2/16/12
to google-app...@googlegroups.com
Ok, thanks

Kua

unread,
Feb 16, 2012, 4:34:41 PM2/16/12
to google-app...@googlegroups.com
We would really like to be able to set forwarding  to any address for our users via the API.   The current limitation that requires a a verified and/or domain address is a real problem for us.

Is there any likelihood that the API will be modified in the near future to accept any external address?

Also, since I am new to the google apps world, where is the best place to request API enhancements or report problems.

Thanks, Kua
Reply all
Reply to author
Forward
0 new messages