Skip to content

Users Gmail Send As Signature Vacation

Jim Garrison edited this page Mar 11, 2023 · 1 revision

Users - Gmail - Send As/Signature/Vacation

API documentation

Definitions

<UserGoogleDoc> ::=
        <EmailAddress> <DriveFileIDEntity>|<DriveFileNameEntity>|(<SharedDriveEntity> <SharedDriveFileNameEntity>)

<FalseValues>= false|off|no|disabled|0
<TrueValues> ::= true|on|yes|enabled|1
<DomainName> ::= <String>(.<String>)+
<EmailAddress> ::= <String>@<DomainName>
<EmailAddressList> ::= "<EmailAddress>(,<EmailAddress>)*"
<EmailAddressEntity> ::=
        <EmailAddressList>|<FileSelector>|<CSVkmdSelector>|<CSVDataSelector>
<Charset> ::= ascii|mbcs|utf-8|utf-8-sig|utf-16|<String>
<Password> ::= <String>
<SMTPHostName> ::= <String>
<Tag> ::= <String>
<UserName> ::= <String>
<UserReplacement> ::=
        (field:<UserReplacementFieldName>)|(schema:<SchemaName>.<FieldName>)|<String>

Manage sendas

gam <UserTypeEntity> [create|add] sendas <EmailAddress> <String>
        [(signature|sig|htmlsig <String>)|(file|htmlfile <FileName> [charset <CharSet>])|(gdoc|ghtml <UserGoogleDoc>)
            (replace <Tag> <UserReplacement>)*]
        [html [<Boolean>]] [replyto <EmailAddress>] [default] [treatasalias <Boolean>]
        [smtpmsa.host <SMTPHostName> smtpmsa.port 25|465|587
         smtpmsa.username <UserName> smtpmsa.password <Password>
         [smtpmsa.securitymode none|ssl|starttls]]
gam <UserTypeEntity> update sendas <EmailAddress> [name <String>]
        [(signature|sig|htmlsig <String>)|(file|htmlfile <FileName> [charset <CharSet>])|(gdoc|ghtml <UserGoogleDoc>)
            (replace <Tag> <UserReplacement>)*]
        [html [<Boolean>]] [replyto <EmailAddress>] [default] [treatasalias <Boolean>]
gam <UserTypeEntity> delete sendas <EmailAddressEntity>

With create|add, the <String> following <EmailAddress> is the display name of the sendas address.

There are three ways to specify the signature:

  • signature|sig|htmlsig <String> - Use <String> as the signature
  • file|htmlfile <FileName> [charset <CharSet>] - Read the signature from <FileName>
  • gdoc|ghtml <UserGoogleDoc> - Read the signature from <UserGoogleDoc>

The default option sets <EmailAddress> as the default sendas address for the user.

You can allow users to send mail through an external SMTP server when configuring a sendas address hosted outside your email domains. You must enable this capability in Admin Console/Apps/Google Workspace/Gmail/Advanced settings/End User Access/Allow per-user outbound gateways.

Example: Paul shall send emails from the marketing email address with the name Paul from Example" and replies shall go back to them.
gam user paul add sendas [email protected] "Paul from Example" replyto paul

Display sendas

Display the information as an indented list of keys and values.

gam <UserTypeEntity> info sendas <EmailAddressEntity> [compact|format|html]
gam <UserTypeEntity> show sendas [compact|format|html]
        [primary|default] [verifyonly]

These are the output formatting options:

  • compact - Escape carriage returns as \r and newlines as \n in original HTML; this format produces output that can be used as input to GAM
  • format - Strip HTML keywords leaving basic printable information
  • html - Show original HTML; this is the default option; the output is human readable but cannot be used as input to GAM

By default, all sendas addresses are shown, use these options to limit the display:

  • primary - Display the primary email address
  • default - Display the default sendas address

Use the verifyonly option to display True or False in the signature field based on whether the signature is non-blank.

Display the information in CSV form.

gam <UserTypeEntity> print sendas [compact]
        [primary|default] [verifyonly] [todrive <ToDriveAttribute>*]

These are the output formatting options:

  • compact - Strip carriage returns and newlines in original HTML; this makes these values easier to process in the CSV file and can be used as input to GAM.

By default, all sendas addresses are shown, use these options to limit the display:

  • primary - Display the primary email address
  • default - Display the default sendas address

Use the verifyonly option to display True or False in the signature field based on whether the signature is non-blank.

Manage signature

gam <UserTypeEntity> signature|sig
        (<String>)|(file|htmlfile <FileName> [charset <Charset>])|(gdoc|ghtml <UserGoogleDoc>)
        (replace <Tag> <UserReplacement>)*
        [html [<Boolean>]] [replyto <EmailAddress>] [default] [treatasalias <Boolean>]
        [name <String>]
        [primary]

The default option sets <EmailAddress> as the default sendas address for the user.

When <UserTypeEntity> specifies an alias, the primary option causes the primary email address signature rather than the alias signature to be set.

[name <String>] sets the display name for non-primary sendas addresses, not the name of the signature, as that isn't possible via the API.

If you have a current default signature, the API will update that, but if you delete it, it seems that the API will not over-write any of the other signatures, but instead add a new signature called My signature. If you rename that signature, the API will keep on updating that same signature, and not touch the other signatures.

Display signature

Display the information as an indented list of keys and values.

gam <UserTypeEntity> show signature|sig [compact|format|html]
        [primary|default] [verifyonly]

These are the output formatting options:

  • compact - Escape carriage returns as \r and newlines as \n in original HTML; this format produces output that can be used as input to GAM
  • format - Strip HTML keywords leaving basic printable information
  • html - Show original HTML; this is the default option; the output is human readable but cannot be used an input to GAM

By default, the signature for <UserTypeEntity> is displayed, use these options to alter the display:

  • primary - Display the primary email address signature
  • default - Display the default sendas address signature

Use the verifyonly option to display True or False in the signature field based on whether the signature is non-blank.

Display the information in CSV form.

gam <UserTypeEntity> print signature [compact]
            [primary|default] [verifyonly] [todrive <ToDriveAttribute>*]

These are the output formatting options:

  • compact - Strip carriage returns and newlines in original HTML; this makes these values easier to process in the CSV file and can be used as input to GAM.

By default, the signature for <UserTypeEntity> is displayed, use these options to alter the display:

  • primary - Display the primary email address signature
  • default - Display the default sendas address signature

Use the verifyonly option to display True or False in the signature field based on whether the signature is non-blank.

Display users without a primary email address signature

The command line is wrapped for readability.

gam config csv_output_row_filter "signature:boolean:false"
    csv_output_header_filter "User,displayName,signature"
    auto_batch_min 1 num_threads 10
    redirect csv ./NoPrimarySignature.csv multiprocess
    all users print signature primary verifyonly
  • config csv_output_row_filter "signature:boolean:false" - Output rows that indicate no signature
  • csv_output_header_filter "User,displayName,signature" - Output basic headers
  • auto_batch_min 1 num_threads 10 - Turn on parallel processing
  • redirect csv ./NoPrimarySignature.csv multiprocess - Intelligently combine output from all processes
  • all users - Process all non-suspended users
  • print signature primary verifyonly - Display state of primary email address signature

Manage vacation

gam <UserTypeEntity> vacation <Boolean> subject <String>
        [(message|htmlmessage <String>)|(file|htmlfile <FileName> [charset <CharSet>])|(gdoc|ghtml <UserGoogleDoc>)]
        (replace <Tag> <UserReplacement>)*
        [html [<Boolean>]] [contactsonly [<Boolean>]] [domainonly [<Boolean>]]
        [start|startdate <Date>|Started] [end|enddate <Date>|NotSpecified]

It's highly recommended to set (overwrite) start and end date. Otherwise it may not work for users who used vacation messages previously and where the end date is already expired.

Example: gam [email protected] vacation ON subject "[Out of Office]" file autoreply.eml start 2000-01-01 end 2999-01-01

Display vacation

gam <UserTypeEntity> show vacation [compact|format|html] [enabledonly]

Gam displays the information as an indented list of keys and values.

These are the output formatting options:

  • compact - Escape carriage returns as \r and newlines as \n in original HTML; this format produces output that can be used as input to GAM

  • format - Strip HTML keywords leaving basic printable information

  • html - Show original HTML; this is the default option; the output is human readable but cannot be used an input to GAM

  • enabledonly - Do not display users with vacation autoreply disabled.

gam <UserTypeEntity> print vacation [compact] [enabledonly] [todrive <ToDriveAttribute>*]

Gam displays the information in CSV form.

  • compact - Strip carriage returns and newlines in original HTML; this makes these values easier to process in the CSV file and can be used as input to GAM.
  • enabledonly - Do not display users with vacation autoreply disabled.

Update History

Installation

Configuration

Notes and Information

Definitions

Command Processing

Collections

Client Access

Special Service Account Access

Service Account Access

Clone this wiki locally