com.aspose.email

Interfaces

Classes

Enums

Exceptions

com.aspose.email

Class GmailClient

    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void dispose()
      Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
      String getAccessToken()
      Gets or sets OAuth 2.0 access token In case if refresh token is set, access token is generated automatically.
      String getDefaultEmail()
      Gets or sets default email address
      static int getDefaultTimeout()
      Gets or sets the default timeout value for ActiveSync client instances The default value is 100,000 milliseconds (100 seconds).
      static IGmailClient getInstance(String accessToken, com.aspose.ms.System.Net.IWebProxy proxy, String defaultEmail)
      Gets instance of Gmail client
      static IGmailClient getInstance(String accessToken, String defaultEmail)
      Gets instance of Gmail client
      static IGmailClient getInstance(String clientId, String clientSecret, String refreshToken, com.aspose.ms.System.Net.IWebProxy proxy, String defaultEmail)
      Gets instance of Gmail client
      static IGmailClient getInstance(String clientId, String clientSecret, String refreshToken, String defaultEmail)
      Gets instance of Gmail client
      com.aspose.ms.System.Net.IWebProxy getProxy()
      Gets or sets the proxy.
      int getTimeout()
      Gets or sets the number of milliseconds to wait before the operation times out.
      void refreshToken()
      Refresh access token
      void setAccessToken(String value)
      Gets or sets OAuth 2.0 access token In case if refresh token is set, access token is generated automatically.
      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).
      void setProxy(com.aspose.ms.System.Net.IWebProxy value)
      Gets or sets the proxy.
      void setTimeout(int value)
      Gets or sets the number of milliseconds to wait before the operation times out.
    • Method Detail

      • 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,
                               com.aspose.ms.System.Net.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,
                               com.aspose.ms.System.Net.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
      • getProxy

        public com.aspose.ms.System.Net.IWebProxy getProxy()

        Gets or sets the proxy.

        Specified by:
        getProxy in interface IBaseGmailClient
      • setProxy

        public void setProxy(com.aspose.ms.System.Net.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 com.aspose.ms.System.IDisposable