public class EMailSender extends Object
Modifier and Type | Field and Description |
---|---|
static int |
SECURITY_NONE |
static int |
SECURITY_SSL |
static int |
SECURITY_TLS |
static int |
SECURITY_TLS_IF_AVAILABLE |
Constructor and Description |
---|
EMailSender() |
Modifier and Type | Method and Description |
---|---|
int |
getConnectionSecurity() |
String |
getHost() |
String |
getPassword() |
int |
getPort() |
String |
getSender() |
MessageTemplateDAO |
getTemplateDao() |
String |
getUsername() |
boolean |
isAuthEncripted() |
void |
send(EMail email)
This method sends an email using the smtp-protocol.
|
void |
send(EMail email,
String templateName,
Map<String,String> args)
Sends an email by using a given template
|
void |
setAuthEncripted(boolean authEncripted) |
void |
setConnectionSecurity(int connectionSecurity) |
void |
setHost(String host) |
void |
setPassword(String password) |
void |
setPort(int port) |
void |
setSender(String sender) |
void |
setTemplateDao(MessageTemplateDAO templateDao) |
void |
setUsername(String username) |
public static final int SECURITY_NONE
public static final int SECURITY_TLS_IF_AVAILABLE
public static final int SECURITY_TLS
public static final int SECURITY_SSL
public String getSender()
public void setSender(String sender)
public String getHost()
public void setHost(String host)
public String getPassword()
public void setPassword(String password)
public int getPort()
public void setPort(int port)
public String getUsername()
public void setUsername(String username)
public void send(EMail email, String templateName, Map<String,String> args) throws Exception
email
- The email to sendtemplateName
- Name of the template to be appliedargs
- The arguments to be used in the templateException
public void send(EMail email) throws Exception
account
- E-Mail account of the sender.email
- E-Mail which should be sent.Exception
public boolean isAuthEncripted()
public void setAuthEncripted(boolean authEncripted)
public int getConnectionSecurity()
public void setConnectionSecurity(int connectionSecurity)
public void setTemplateDao(MessageTemplateDAO templateDao)
public MessageTemplateDAO getTemplateDao()
Copyright © 2008-2014 Logical Objects. All Rights Reserved.