Interface AQSmtpServer


  • public interface AQSmtpServer
    This interface describes an SMTP server.

    An instance of the object that implements the AQSmtpServer interface can be instantiated via aqua.mail.newSmtpServer() alias. The system's default SMTP server can be obtained via aqua.mail.getDefaultSmtpServer() alias.

    In Aqua Data Studio, one can alter the settings of system's default SMTP server using the Options dialog as:
        File -> Options -> E-mail -> SMTP Server
            * SMTP Server
            * SMTP Port
            * SMTP Username
            * SMTP Passwrod
            * SMTP Use SSL check box
            * SMTP Use Authentication check box

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getHost()
      Returns the host address of the SMTP server.
      int getPort()
      Returns the port number to which the STMP server is listen.
      boolean isUseAuthentication()
      Returns true if authentication is required on the SMTP server.
      boolean isUseSSL()
      Returns true if to connect to the SMTP server using SSL.
      void sendMail​(AQMailMessage email)
      Delivers an email via this SMTP server.
      void setHost​(java.lang.String host)
      Sets the host address of the SMTP server.
      void setPassword​(java.lang.Object password)
      Sets the password of the account on the SMTP server.
      void setPort​(int port)
      Sets the port number to which the STMP server is listen.
      void setUseAuthentication​(boolean flag)
      Instructs SMTP to use authentication, default is false.
      void setUserName​(java.lang.Object userName)
      Sets the user name of the account on the SMTP server.
      void setUseSSL​(boolean flag)
      Instructs SMTP to use SSL connection, default is false.
    • Method Detail

      • setUserName

        void setUserName​(java.lang.Object userName)
        Sets the user name of the account on the SMTP server. This method expects a String or an AQOpaqueObject argument.
        Parameters:
        userName - the user name
      • setPassword

        void setPassword​(java.lang.Object password)
        Sets the password of the account on the SMTP server. This method expects a String or an AQOpaqueObject argument.
        Parameters:
        password - the password
      • setHost

        void setHost​(java.lang.String host)
        Sets the host address of the SMTP server.
        Parameters:
        host - the host address
      • getHost

        java.lang.String getHost()
        Returns the host address of the SMTP server.
        Returns:
        the host
      • setPort

        void setPort​(int port)
        Sets the port number to which the STMP server is listen.
        Parameters:
        port - the port number
      • getPort

        int getPort()
        Returns the port number to which the STMP server is listen. Port number defaults to 25.
        Returns:
        the port
      • setUseSSL

        void setUseSSL​(boolean flag)
        Instructs SMTP to use SSL connection, default is false.
        Parameters:
        flag - use SSL connection if true
      • isUseSSL

        boolean isUseSSL()
        Returns true if to connect to the SMTP server using SSL.
        Returns:
        TRUE if use SSL
      • setUseAuthentication

        void setUseAuthentication​(boolean flag)
        Instructs SMTP to use authentication, default is false.
        Parameters:
        flag - authenticate user if true
      • isUseAuthentication

        boolean isUseAuthentication()
        Returns true if authentication is required on the SMTP server.
        Returns:
        TRUE if use authentication
      • sendMail

        void sendMail​(AQMailMessage email)
               throws java.lang.Exception
        Delivers an email via this SMTP server.
        Parameters:
        email - the email to deliver
        Throws:
        java.lang.Exception - On error