OpenAPI 1.0

com.aquafold.openapi.mail
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
 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(String host)
          Sets the host address of the SMTP server.
 void setPassword(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(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(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(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(String host)
Sets the host address of the SMTP server.

Parameters:
host - the host address

getHost

String getHost()
Returns the host address of the SMTP server.


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.


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.


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.


sendMail

void sendMail(AQMailMessage email)
              throws Exception
Delivers an email via this SMTP server.

Parameters:
email - the email to deliver
Throws:
Exception

OpenAPI 1.0


Copyright © 2010 AquaFold, Inc. All Rights Reserved. Use is subject to license terms.