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

cron - how to properly run Python script with crontab on every system startup -

elasticsearch - Is the order of operations guaranteed in a bulk update? -

Slow performance first queries on SQL Azure -