Package com.aquafold.openapi.mail
Interface AQSmtpServer
-
public interface AQSmtpServerThis interface describes an SMTP server.An instance of the object that implements the
AQSmtpServerinterface 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.StringgetHost()Returns the host address of the SMTP server.intgetPort()Returns the port number to which the STMP server is listen.booleanisUseAuthentication()Returns true if authentication is required on the SMTP server.booleanisUseSSL()Returns true if to connect to the SMTP server using SSL.voidsendMail(AQMailMessage email)Delivers an email via this SMTP server.voidsetHost(java.lang.String host)Sets the host address of the SMTP server.voidsetPassword(java.lang.Object password)Sets the password of the account on the SMTP server.voidsetPort(int port)Sets the port number to which the STMP server is listen.voidsetUseAuthentication(boolean flag)Instructs SMTP to use authentication, default is false.voidsetUserName(java.lang.Object userName)Sets the user name of the account on the SMTP server.voidsetUseSSL(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 anAQOpaqueObjectargument.- 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 anAQOpaqueObjectargument.- 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
-
-