Creating user aliases in gmail using google apps script -


i reading in alias email information google form entry , wish use create alias email.

this link talks using directory api accomplish description setting authorization etc. seems web application.

how create email alias account using google apps script associated google form?

you can use admin sdk's directory api in apps script, need use advanced admin sdk directory service (that must enabled before use. in script editor select resources > advanced google services... , enable in google developers console.)

once enabled can add alias this:

function myfunction() {   var userkey = 'jane.doe@mydomain.com';   var resource = {     alias: 'jenny@mydomain.com'   }    admindirectory.users.aliases.insert(resource, userkey) } 

then can verify alias in admin console in users > select user > account > aliases:

enter image description here


Comments

Popular posts from this blog

many to many - Django Rest Framework ManyToMany filter multiple values -

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

Java Entity Manager - JSON reader was expecting a value but found 'db' -