Skip to content

New GGmailMessagePartObj

Spencer Varney edited this page Dec 9, 2016 · 2 revisions

New-GGmailMessagePartObj

SYNOPSIS

Creates a new Gmail API MessagePart object.

SYNTAX

New-GGmailMessagePartObj [-PartId] <String> [-MimeType] <String> [-Filename] <String> [-Headers] <Hashtable>
 [-BodyAttachmentId] <String> [-BodyData] <String> [-BodySize] <Int32> [-Parts] <MessagePart[]> [-WhatIf]
 [-Confirm]

DESCRIPTION

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

EXAMPLES

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

PS C:\> New-GGmailMessagePartObj

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

-PartId

The immutable ID of the message part.

Type: String
Parameter Sets: (All)
Aliases: 

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

-MimeType

The MIME type of the message part.

Type: String
Parameter Sets: (All)
Aliases: 

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

-Filename

The filename of the attachment. Only present if this message part represents an attachment.

Type: String
Parameter Sets: (All)
Aliases: 

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

-Headers

Hashtable of headers on this message part. For the top-level message part, representing the entire message payload, it will contain the standard RFC 2822 email headers such as To, From, and Subject.

Type: Hashtable
Parameter Sets: (All)
Aliases: 

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

-BodyAttachmentId

When present, contains the ID of an external attachment that can be retrieved in a separate messages.attachments.get request. When not present, the entire content of the message part body is contained in the data field.

Type: String
Parameter Sets: (All)
Aliases: 

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

-BodyData

The body data of a MIME message part. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.

Type: String
Parameter Sets: (All)
Aliases: 

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

-BodySize

Total number of bytes in the body of the message part.

Type: Int32
Parameter Sets: (All)
Aliases: 

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

-Parts

The child MIME message parts of this part. This only applies to container MIME message parts, for example multipart. For non- container MIME message part types, such as text/plain, this field is empty. For more information, see RFC 1521.

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

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

INPUTS

System.String

The immutable ID of the message part.

System.String

The MIME type of the message part.

System.String

The filename of the attachment. Only present if this message part represents an attachment.

System.Collections.Hashtable

Hashtable of headers on this message part. For the top-level message part, representing the entire message payload, it will contain the standard RFC 2822 email headers such as To, From, and Subject.

System.String

When present, contains the ID of an external attachment that can be retrieved in a separate messages.attachments.get request. When not present, the entire content of the message part body is contained in the data field.

System.String

The body data of a MIME message part. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.

System.Int32

Total number of bytes in the body of the message part.

Google.Apis.Gmail.v1.Data.MessagePart[]

The child MIME message parts of this part. This only applies to container MIME message parts, for example multipart. For non- container MIME message part types, such as text/plain, this field is empty. For more information, see RFC 1521.

OUTPUTS

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