public interface AQSmtpServer
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
Modifier and Type | Method and Description |
---|---|
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.
|
void setUserName(Object userName)
AQOpaqueObject
argument.userName
- the user namevoid setPassword(Object password)
AQOpaqueObject
argument.password
- the passwordvoid setHost(String host)
host
- the host addressString getHost()
void setPort(int port)
port
- the port numberint getPort()
void setUseSSL(boolean flag)
flag
- use SSL connection if trueboolean isUseSSL()
void setUseAuthentication(boolean flag)
flag
- authenticate user if trueboolean isUseAuthentication()
void sendMail(AQMailMessage email) throws Exception
email
- the email to deliverException
- On error
Copyright © 2017 AquaFold, Inc. All Rights Reserved. Use is subject to license terms.