GMail Component
Properties Methods Events Configuration Settings Errors
The GMail component provides an easy to use interface to Gmail.
Syntax
nsoftware.InGoogle.Gmail
Remarks
GMail provides a simple way to access and manage mail in Gmail.
The component connects to the Gmail server using IMAP and also supports Gmail specific IMAP extensions such as thread ids and labels.
To begin you may authenticate either by specifying User and Password, or by providing an OAuth authorization string in Authorization and setting AuthMechanism to amSASLXOAuth2. Call the Connect method to connect.
After connecting set the Mailbox property and call SelectMailbox to select a mailbox to examine. To retrieve information about the messages in the mailbox set MessageSet and call FetchMessageInfo. To download a message call FetchMessageText.
Many other operations are supported by the component including managing flags, moving and copying messages, working with Gmail labels, and more. Review the methods listed in this help file for more information on supported operations.
Property List
The following is the full list of the properties of the component with short descriptions. Click on the links for further details.
AuthMechanism | The authentication mechanism to be used when connecting to the mail server. |
Authorization | OAuth 2.0 Authorization Token. |
AutoDecodeParts | Determines whether to automatically decode message parts. |
Command | Can be used to send additional commands directly to the server. |
Connected | Shows whether the component is connected. |
EndByte | The byte index of the position where the transfer should end. |
Firewall | A set of properties related to firewall access. |
LastReply | The last reply from the server. |
LocalFile | The path to a local file for downloading the message body. If the file exists, it is overwritten (optional). |
LocalHost | The name of the local host or user-assigned IP interface through which connections are initiated or accepted. |
Mailbox | Name of the mailbox selected on the server. |
MailboxFlags | Defines flags in the selected mailbox. |
MailboxList | Collection of mailboxes listed by the server. |
MailPort | The port of the IMAP server (default is 143). |
MailServer | The name or address of the mail server (IMAP server). |
Message | Provides the raw message content. |
MessageContentEncoding | The ContentEncoding of the selected message. |
MessageContentType | The ContentType of the message. |
MessageCount | The total number of messages on the Mailbox . |
MessageDate | The time the message was created. |
MessageDeliveryTime | The time the message was delivered to the mail server. |
MessageFlags | Contains the flags of the current message. |
MessageFrom | The address of the author of the message. |
MessageGmailId | The unique Gmail Id of the message. |
MessageHeaders | Collection of RFC822-encoded headers of the message. |
MessageHeadersString | String version of RFC822-encoded headers of the message. |
MessageId | The message identifier of the current message. |
MessageInfo | Collection of messages retrieved by FetchMessageInfo . |
MessageInReplyTo | The unique message identifier of the message this one is in reply to. |
MessageLabels | A space separated list of labels. |
MessageNetId | The globally unique identifier of the message. |
MessageParts | Collection of message parts collected by FetchMessageInfo . |
MessageRecipients | Collection of recipients for the current message. |
MessageReplyTo | Email address(s) where replies to the message should be sent. |
MessageSender | The address of the sender of the message. |
MessageSet | The set of messages to operate on. |
MessageSize | The size of the selected message. |
MessageSubject | The subject of the message. |
MessageText | The body of the retrieved message. |
MessageThreadId | The thread Id of the current message. |
Overwrite | Indicates whether or not the component should overwrite files during transfer. |
Password | The password used to authenticate to the MailServer . |
PeekMode | When set to True, the message Seen flag is not changed during reading. |
RecentMessageCount | Number of new messages in the Mailbox . |
SearchCriteria | Criteria used when searching. |
SortCriteria | Sorts criteria to use for message retrieval operations. |
SSLAcceptServerCert | Instructs the component to unconditionally accept the server certificate that matches the supplied certificate. |
SSLCert | The certificate to be used during SSL negotiation. |
SSLServerCert | The server certificate for the last established connection. |
SSLStartMode | Determines how the component starts the SSL negotiation. |
StartByte | The byte index of the position where the transfer should start. |
Timeout | A timeout for the component. |
UIDMode | If true, permanent message identifiers are used instead of the default temporary identifiers. |
UIDValidity | The UIDValidity parameter sent from the server in response to SelectMailbox command. |
User | The user name used to authenticate to the MailServer . |
Method List
The following is the full list of the methods of the component with short descriptions. Click on the links for further details.
AddMessageFlags | Adds the specified flags to the messages specified by MessageSet . |
AddMessageLabels | Adds the specified labels to the message specified by MessageSet. |
AppendToMailbox | Appends the message in MessageText to the mailbox specified by Mailbox . |
CheckMailbox | Sends a 'CHECK' command to the server. |
CloseMailbox | Removes all messages marked with 'Deleted' flag from the currently selected mailbox and unselect mailbox. |
Config | Sets or retrieves a configuration setting . |
Connect | Connects to an IMAP server. |
CopyToMailbox | Copies the messages specified by MessageSet to the mailbox specified by Mailbox . |
CreateMailbox | Creates a new mailbox specified by Mailbox . |
DeleteFromMailbox | Marks the messages specified by MessageSet as deleted. |
DeleteMailbox | Deletes a mailbox specified by Mailbox . |
DeleteMailboxACL | Deletes mailbox access control rights for a specific user. |
Disconnect | Disconnects from an IMAP server. |
DoEvents | Processes events from the internal message queue. |
ExamineMailbox | Selects a Mailbox (Read-only mode). |
ExpungeMailbox | Removes all messages marked with 'Deleted' flag from the currently selected mailbox. |
FetchMessageHeaders | Retrieves the message headers of messages specified by the MessageSet property. |
FetchMessageInfo | Retrieves information about messages specified by the MessageSet property. |
FetchMessagePart | Retrieves the message part specified by PartID. |
FetchMessagePartHeaders | Retrieves the headers of message part specified by PartID. |
FetchMessageText | Retrieves the message text of messages specified by the MessageSet property. |
GetMailboxACL | Retrieves mailbox access control rights. |
Interrupt | Interrupt the current method. |
ListMailboxes | Lists all mailboxes matching all criteria in the Mailbox property. |
ListSubscribedMailboxes | Lists all subscribed mailboxes matching all criteria in the Mailbox property. |
LocalizeDate | Converts a valid RFC 822 message date to local date and time. |
MoveToMailbox | Moves the messages specified by MessageSet to the mailbox specified by Mailbox . |
Noop | Sends a 'NOOP' command to the server. |
RenameMailbox | Change the name of Mailbox to NewName . |
ResetMessageFlags | Replaces the flags of the messages specified by MessageSet with the flags specified by MessageFlags . |
ResetMessageLabels | Replaces the labels of the message specified by MessageSet with the labels specified by MessageLabels. |
SearchMailbox | Search selected mailbox for specified text. |
SelectMailbox | Select a Mailbox. |
SetMailboxACL | Sets mailbox access control rights for a specific user. |
SetMessageStream | Sets the stream to which the message (or message part) downloaded from the server will be written. |
SubscribeMailbox | Subscribes to the mailbox specified by Mailbox . |
UnsetMessageFlags | Removes the flags specified by MessageFlags from the messages specified by MessageSet . |
UnsetMessageLabels | Removes the message labels specified by MessageLabels from the message specified by MessageSet. |
UnsubscribeMailbox | Unsubscribes from the mailbox specified by Mailbox . |
Event List
The following is the full list of the events fired by the component with short descriptions. Click on the links for further details.
ConnectionStatus | Fired to indicate changes in connection state. |
EndTransfer | Fired when the message or the part data finishes transferring. |
Error | Information about errors during data delivery. |
Header | Fired every time a header line comes in. |
MailboxACL | Fires for each set of access control rights returned by the server. |
MailboxList | Fired for each mailbox received through the ListMailboxes and ListSubscribedMailboxes methods. |
MessageInfo | Fired with information for the message(s) retrieved by the server. |
MessagePart | Fired for each message part when FetchMessageInfo is called. |
PITrail | Traces the commands sent to the mail server, and the respective replies. |
SSLServerAuthentication | Fired after the server presents its certificate to the client. |
SSLStatus | Shows the progress of the secure connection. |
StartTransfer | Fired when the message or the part data starts transferring. |
Transfer | Fired while the message gets transferred from the MailServer . |
Configuration Settings
The following is a list of configuration settings for the component with short descriptions. Click on the links for further details.
Idle | The current status of the component. |
AlwaysReturnUIDs | Instructs the server to return UIDs even if not in UIDMode. |
AppendToMailboxDateTime | Specifies the date-time parameter used in the initial APPEND request. |
AuthorizationIdentity | The value to use as the authorization identity when SASL authentication is used. |
AutoDecodeSubject | Instructs the component to automatically decode message subjects. |
EnableIMAPIDLE | Enables or disables IDLE command support in the component. |
FetchAfterSearch | Determines if messages matching the SearchCriteria are fetched after calling SearchMailbox. |
IncludeHeaders | Instructs the component to include the headers in the LocalFile. |
UTF7MailboxNames | Specifies whether or not to automatically encode and decode UTF-7 mailbox names. |
ConnectionTimeout | Sets a separate timeout value for establishing a connection. |
FirewallAutoDetect | Tells the component whether or not to automatically detect and use firewall system settings, if available. |
FirewallHost | Name or IP address of firewall (optional). |
FirewallPassword | Password to be used if authentication is to be used when connecting through the firewall. |
FirewallPort | The TCP port for the FirewallHost;. |
FirewallType | Determines the type of firewall to connect through. |
FirewallUser | A user name if authentication is to be used connecting through a firewall. |
KeepAliveTime | The inactivity time in milliseconds before a TCP keep-alive packet is sent. |
KeepAliveInterval | The retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received. |
Linger | When set to True, connections are terminated gracefully. |
LingerTime | Time in seconds to have the connection linger. |
LocalHost | The name of the local host through which connections are initiated or accepted. |
LocalPort | The TCP port in the local host where the component binds. |
MaxLineLength | The maximum amount of data to accumulate when no EOL is found. |
MaxTransferRate | The transfer rate limit in bytes per second. |
RecordLength | The length of received data records. |
TCPKeepAlive | Determines whether or not the keep alive socket option is enabled. |
UseIPv6 | Whether to use IPv6. |
TcpNoDelay | Whether or not to delay when sending packets. |
ReuseSSLSession | Determines if the SSL session is reused. |
SSLCipherStrength | The minimum cipher strength used for bulk encryption. |
SSLEnabledProtocols | Used to enable/disable the supported security protocols. |
SSLProvider | The name of the security provider to use. |
SSLSecurityFlags | Flags that control certificate verification. |
OpenSSLCADir | The path to a directory containing CA certificates. |
OpenSSLCAFile | Name of the file containing the list of CA's trusted by your application. |
OpenSSLCipherList | A string that controls the ciphers to be used by SSL. |
OpenSSLPrngSeedData | The data to seed the pseudo random number generator (PRNG). |
AbsoluteTimeout | Determines whether timeouts are inactivity timeouts or absolute timeouts. |
FirewallData | Used to send extra data to the firewall. |
InBufferSize | The size in bytes of the incoming queue of the socket. |
OutBufferSize | The size in bytes of the outgoing queue of the socket. |
CodePage | The system code page used for Unicode to Multibyte translations. |