我正在使用
Google data Python client library
将电子邮件导入我的用户帐户。
如果这对主域中的用户来说是正常的,那么对于单独域中的使用者,我会得到一个错误。
from gdata.apps.migration import service
user = "user@example.fr"
admin = "admin@example.com"
admin_pwd = "hackme"
srv = service.MigrationService(email = admin, password = admin_pwd, domain = "example.com")
所以如果我设置
domain
对于主批,当我尝试提交批时,会收到以下错误消息:
gdata.apps.service.AppsForYourDomainException: {'status': 403, 'body': '<HTML>\n<HEAD>\n<TITLE>Authorization failed. Ensure that the destination user exists and try again.</TITLE>\n</HEAD>\n<BODY BGCOLOR="#FFFFFF" TEXT="#000000">\n<H1>Authorization failed. Ensure that the destination user exists and try again.</H1>\n<H2>Error 403</H2>\n</BODY>\n</HTML>\n', 'reason': 'Authorization failed. Ensure that the destination user exists and try again.'}
如果我没有设置域名,我会得到这个域名:
gdata.apps.service.AppsForYourDomainException: {'status': 403, 'body': '<HTML>\n<HEAD>\n<TITLE>Invalid domain.</TITLE>\n</HEAD>\n<BODY BGCOLOR="#FFFFFF" TEXT="#000000">\n<H1>Invalid domain.</H1>\n<H2>Error 403</H2>\n</BODY>\n</HTML>\n', 'reason': 'Invalid domain.'}
我可以理解为什么我会出现这些错误,但问题是:我可以在单独的域上导入用户的电子邮件吗?如果是,怎么做?