def _processForwardingAddress(user, i, count, emailAddress, j, jcount, gmail, function, **kwargs):
userDefined = True
try:
result = callGAPI(gmail.users().settings().forwardingAddresses(), function,
throw_reasons=GAPI.GMAIL_THROW_REASONS+[GAPI.NOT_FOUND, GAPI.ALREADY_EXISTS, GAPI.DUPLICATE],
userId=u'me', **kwargs)
if function == u'get':
_showForwardingAddress(j, count, result)
else:
entityActionPerformed([Ent.USER, user, Ent.FORWARDING_ADDRESS, emailAddress], j, jcount)
except (GAPI.notFound, GAPI.alreadyExists, GAPI.duplicate) as e:
entityActionFailedWarning([Ent.USER, user, Ent.FORWARDING_ADDRESS, emailAddress], str(e), j, jcount)
except (GAPI.serviceNotAvailable, GAPI.badRequest):
entityServiceNotApplicableWarning(Ent.USER, user, i, count)
userDefined = False
return userDefined
# gam <UserTypeEntity> create|add forwardingaddresses <EmailAddressEntity>
评论列表
文章目录