Skip to content

New GGmailMessageObj

Spencer Varney edited this page Dec 14, 2016 · 3 revisions

New-GGmailMessageObj

SYNOPSIS

Creates a new Gmail API Message object.

SYNTAX

New-GGmailMessageObj [[-HistoryId] <UInt64>] [[-Id] <String>] [[-InternalDate] <Int64>]
 [[-LabelIds] <String[]>] [[-Payload] <MessagePart>] [[-Raw] <String>] [[-SizeEstimate] <Int32>]
 [[-Snippet] <String>] [[-ThreadId] <String>] [-WhatIf] [-Confirm]

DESCRIPTION

This provides a Cmdlet-Based approach to creating a Message 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.Message

EXAMPLES

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

PS C:\> New-GGmailMessageObj

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

-HistoryId

The ID of the last history record that modified this message.

Type: UInt64
Parameter Sets: (All)
Aliases: 

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

-Id

The immutable ID of the message.

Type: String
Parameter Sets: (All)
Aliases: 

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

-InternalDate

The internal message creation timestamp (epoch ms), which determines ordering in the inbox. For normal SMTP-received email, this represents the time the message was originally accepted by Google, which is more reliable than the Date header. However, for API-migrated mail, it can be configured by client to be based on the Date header.

Type: Int64
Parameter Sets: (All)
Aliases: 

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

-LabelIds

List of IDs of labels applied to this message.

Type: String[]
Parameter Sets: (All)
Aliases: 

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

-Payload

The parsed email structure in the message parts.

Type: MessagePart
Parameter Sets: (All)
Aliases: 

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

-Raw

The entire email message in an RFC 2822 formatted and base64url encoded string. Returned in messages.get and drafts.get responses when the format=RAW parameter is supplied.

Type: String
Parameter Sets: (All)
Aliases: 

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

-SizeEstimate

Estimated size in bytes of the message.

Type: Int32
Parameter Sets: (All)
Aliases: 

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

-Snippet

A short part of the message text.

Type: String
Parameter Sets: (All)
Aliases: 

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

-ThreadId

The ID of the thread the message belongs to. To add a message or draft to a thread, the following criteria must be met:- The requested threadId must be specified on the Message or Draft.Message you supply with your request.- The References and In-Reply-To headers must be set in compliance with the RFC 2822 standard.- The Subject headers must match.

Type: String
Parameter Sets: (All)
Aliases: 

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

INPUTS

System.UInt64

The ID of the last history record that modified this message.

System.String

The immutable ID of the message.

System.Int64

The internal message creation timestamp (epoch ms), which determines ordering in the inbox. For normal SMTP-received email, this represents the time the message was originally accepted by Google, which is more reliable than the Date header. However, for API-migrated mail, it can be configured by client to be based on the Date header.

System.String[]

List of IDs of labels applied to this message.

Google.Apis.Gmail.v1.Data.MessagePart

The parsed email structure in the message parts.

System.String

The entire email message in an RFC 2822 formatted and base64url encoded string. Returned in messages.get and drafts.get responses when the format=RAW parameter is supplied.

System.Int32

Estimated size in bytes of the message.

System.String

A short part of the message text.

System.String

The ID of the thread the message belongs to. To add a message or draft to a thread, the following criteria must be met:- The requested threadId must be specified on the Message or Draft.Message you supply with your request.- The References and In-Reply-To headers must be set in compliance with the RFC 2822 standard.- The Subject headers must match.

OUTPUTS

Google.Apis.Gmail.v1.Data.Message

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