From https://sites.google.com/site/scriptsexamples/learn-by-example/other-examples/contacts-sharing