gogol-gmail-0.0.1: Google Gmail SDK.

Copyright(c) 2015 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.Google.Resource.Gmail.Users.Messages.Insert

Contents

Description

Directly inserts a message into only this user's mailbox similar to IMAP APPEND, bypassing most scanning and classification. Does not send a message.

See: Gmail API Reference for gmail.users.messages.insert.

Synopsis

REST Resource

type UsersMessagesInsertResource = ("gmail" :> ("v1" :> ("users" :> (Capture "userId" Text :> ("messages" :> (QueryParam "deleted" Bool :> (QueryParam "internalDateSource" UsersMessagesInsertInternalDateSource :> (QueryParam "alt" AltJSON :> (ReqBody `[JSON]` Message :> Post `[JSON]` Message))))))))) :<|> ("upload" :> ("gmail" :> ("v1" :> ("users" :> (Capture "userId" Text :> ("messages" :> (QueryParam "deleted" Bool :> (QueryParam "internalDateSource" UsersMessagesInsertInternalDateSource :> (QueryParam "alt" AltJSON :> (QueryParam "uploadType" AltMedia :> (MultipartRelated `[JSON]` Message RequestBody :> Post `[JSON]` Message))))))))))) Source

A resource alias for gmail.users.messages.insert method which the UsersMessagesInsert request conforms to.

Creating a Request

usersMessagesInsert Source

Creates a value of UsersMessagesInsert with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

data UsersMessagesInsert Source

Directly inserts a message into only this user's mailbox similar to IMAP APPEND, bypassing most scanning and classification. Does not send a message.

See: usersMessagesInsert smart constructor.

Request Lenses

uPayload :: Lens' UsersMessagesInsert Message Source

Multipart request metadata.

uUserId :: Lens' UsersMessagesInsert Text Source

The user's email address. The special value me can be used to indicate the authenticated user.

uDeleted :: Lens' UsersMessagesInsert Bool Source

Mark the email as permanently deleted (not TRASH) and only visible in Google Apps Vault to a Vault administrator. Only used for Google Apps for Work accounts.