Skip to content

New GGmailSendAsObj

Spencer Varney edited this page Dec 14, 2016 · 1 revision

New-GGmailSendAsObj

SYNOPSIS

Creates a new Gmail API SendAs object.

SYNTAX

New-GGmailSendAsObj [[-DisplayName] <String>] [[-IsDefault] <Boolean>] [[-IsPrimary] <Boolean>]
 [[-ReplyToAddress] <String>] [[-SendAsEmail] <String>] [[-Signature] <String>] [[-SmtpMsa] <SmtpMsa>]
 [[-TreatAsAlias] <Boolean>] [[-VerificationStatus] <String>] [-WhatIf] [-Confirm]

DESCRIPTION

This provides a Cmdlet-Based approach to creating a SendAs object which may be required as a parameter for some other Cmdlets in the Gmail API category.

You could alternately create this object by calling New-Object -TypeName Google.Apis.Gmail.v1.Data.SendAs

EXAMPLES

---------- EXAMPLE 1 ----------

PS C:\>New-GGmailSendAsObj

This automatically generated example serves to show the bare minimum required to call this Cmdlet.

Additional examples may be added, viewed and edited by users on the community wiki at the URL found in the related links.

PARAMETERS

-DisplayName

A name that appears in the "From:" header for mail sent using this alias. For custom "from" addresses, when this is empty, Gmail will populate the "From:" header with the name that is used for the primary address associated with the account.

Type: String
Parameter Sets: (All)
Aliases: 

Required: False
Position: 0
Default value: 
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-IsDefault

Whether this address is selected as the default "From:" address in situations such as composing a new message or sending a vacation auto-reply. Every Gmail account has exactly one default send-as address, so the only legal value that clients may write to this field is true. Changing this from false to true for an address will result in this field becoming false for the other previous default address.

Type: Boolean
Parameter Sets: (All)
Aliases: 

Required: False
Position: 1
Default value: 
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-IsPrimary

Whether this address is the primary address used to login to the account. Every Gmail account has exactly one primary address, and it cannot be deleted from the collection of send-as aliases. This field is read-only.

Type: Boolean
Parameter Sets: (All)
Aliases: 

Required: False
Position: 2
Default value: 
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ReplyToAddress

An optional email address that is included in a "Reply-To:" header for mail sent using this alias. If this is empty, Gmail will not generate a "Reply-To:" header.

Type: String
Parameter Sets: (All)
Aliases: 

Required: False
Position: 3
Default value: 
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SendAsEmail

The email address that appears in the "From:" header for mail sent using this alias. This is read-only for all operations except create.

Type: String
Parameter Sets: (All)
Aliases: 

Required: False
Position: 4
Default value: 
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Signature

An optional HTML signature that is included in messages composed with this alias in the Gmail web UI.

Type: String
Parameter Sets: (All)
Aliases: 

Required: False
Position: 5
Default value: 
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SmtpMsa

An optional SMTP service that will be used as an outbound relay for mail sent using this alias. If this is empty, outbound mail will be sent directly from Gmail's servers to the destination SMTP service. This setting only applies to custom "from" aliases.

Type: SmtpMsa
Parameter Sets: (All)
Aliases: 

Required: False
Position: 6
Default value: 
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-TreatAsAlias

Whether Gmail should treat this address as an alias for the user's primary email address. This setting only applies to custom "from" aliases.

Type: Boolean
Parameter Sets: (All)
Aliases: 

Required: False
Position: 7
Default value: 
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-VerificationStatus

Indicates whether this address has been verified for use as a send-as alias. Read-only. This setting only applies to custom "from" aliases.

Type: String
Parameter Sets: (All)
Aliases: 

Required: False
Position: 8
Default value: 
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

INPUTS

System.String

A name that appears in the "From:" header for mail sent using this alias. For custom "from" addresses, when this is empty, Gmail will populate the "From:" header with the name that is used for the primary address associated with the account.

System.Boolean

Whether this address is selected as the default "From:" address in situations such as composing a new message or sending a vacation auto-reply. Every Gmail account has exactly one default send-as address, so the only legal value that clients may write to this field is true. Changing this from false to true for an address will result in this field becoming false for the other previous default address.

System.Boolean

Whether this address is the primary address used to login to the account. Every Gmail account has exactly one primary address, and it cannot be deleted from the collection of send-as aliases. This field is read-only.

System.String

An optional email address that is included in a "Reply-To:" header for mail sent using this alias. If this is empty, Gmail will not generate a "Reply-To:" header.

System.String

The email address that appears in the "From:" header for mail sent using this alias. This is read-only for all operations except create.

System.String

An optional HTML signature that is included in messages composed with this alias in the Gmail web UI.

Google.Apis.Gmail.v1.Data.SmtpMsa

An optional SMTP service that will be used as an outbound relay for mail sent using this alias. If this is empty, outbound mail will be sent directly from Gmail's servers to the destination SMTP service. This setting only applies to custom "from" aliases.

System.Boolean

Whether Gmail should treat this address as an alias for the user's primary email address. This setting only applies to custom "from" aliases.

System.String

Indicates whether this address has been verified for use as a send-as alias. Read-only. This setting only applies to custom "from" aliases.

OUTPUTS

Google.Apis.Gmail.v1.Data.SendAs

NOTES

Part of the gShell Project, relating to the Google Gmail API; see Related Links or use the -Online parameter.

RELATED LINKS

[Wiki page for this Cmdlet]

[Getting started with gShell]

Clone this wiki locally