com.aspose.email

Interfaces

Classes

Enums

Exceptions

com.aspose.email

Class GmailClient

    • Method Detail

      • useJDKHTTP

        public static void useJDKHTTP(boolean value)

        Sets value indicating whether JDK HTTP is used.

        Parameters:
        value - True if JDK HTTP should be used.
      • getInstance

        public static IGmailClient getInstance(String accessToken,
                               String defaultEmail)

        Gets instance of Gmail client

        Parameters:
        accessToken - OAuth 2.0 access token
        defaultEmail - Default email address
        Returns:
        Returns instance of Gmail client
      • getInstance

        public static IGmailClient getInstance(String accessToken,
                               IWebProxy proxy,
                               String defaultEmail)

        Gets instance of Gmail client

        Parameters:
        accessToken - OAuth 2.0 access token
        proxy - IWebProxy for Gmail client
        defaultEmail - Default email address
        Returns:
        Returns instance of Gmail client
      • getInstance

        public static IGmailClient getInstance(String clientId,
                               String clientSecret,
                               String refreshToken,
                               String defaultEmail)

        Gets instance of Gmail client

        Parameters:
        clientId - The client ID obtained from the Google Cloud Console during application registration.
        clientSecret - The client secret obtained during application registration.
        refreshToken - OAuth 2.0 refresh token
        defaultEmail - Default email address
        Returns:
        Returns instance of Gmail client
      • getInstance

        public static IGmailClient getInstance(String clientId,
                               String clientSecret,
                               String refreshToken,
                               IWebProxy proxy,
                               String defaultEmail)

        Gets instance of Gmail client

        Parameters:
        clientId - The client ID obtained from the Google Cloud Console during application registration.
        clientSecret - The client secret obtained during application registration.
        refreshToken - OAuth 2.0 refresh token
        proxy - IWebProxy for Gmail client
        defaultEmail - Default email address
        Returns:
        Returns instance of Gmail client
      • getAccessToken

        public String getAccessToken()

        Gets or sets OAuth 2.0 access token In case if refresh token is set, access token is generated automatically.

        Specified by:
        getAccessToken in interface IBaseGmailClient
      • setAccessToken

        public void setAccessToken(String value)

        Gets or sets OAuth 2.0 access token In case if refresh token is set, access token is generated automatically.

        Specified by:
        setAccessToken in interface IBaseGmailClient
      • setProxy

        public void setProxy(IWebProxy value)

        Gets or sets the proxy.

        Specified by:
        setProxy in interface IBaseGmailClient
      • getTimeout

        public int getTimeout()

        Gets or sets the number of milliseconds to wait before the operation times out. The default value is 100,000 milliseconds (100 seconds).

        Specified by:
        getTimeout in interface IBaseGmailClient
      • setTimeout

        public void setTimeout(int value)

        Gets or sets the number of milliseconds to wait before the operation times out. The default value is 100,000 milliseconds (100 seconds).

        Specified by:
        setTimeout in interface IBaseGmailClient
      • getDefaultTimeout

        public static int getDefaultTimeout()

        Gets or sets the default timeout value for ActiveSync client instances The default value is 100,000 milliseconds (100 seconds).

      • setDefaultTimeout

        public static void setDefaultTimeout(int value)

        Gets or sets the default timeout value for ActiveSync client instances The default value is 100,000 milliseconds (100 seconds).

      • dispose

        public void dispose()

        Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

        Specified by:
        dispose in interface IDisposable