org.jboss.seam.mail
@Name(value="org.jboss.seam.mail.mailSession") @Install(precedence=0, classDependencies="javax.mail.Session") @Scope(value=APPLICATION) @BypassInterceptors public class MailSession extends AbstractMutable implements Serializable
Constructor and Description |
---|
MailSession() |
MailSession(String transport) |
Modifier and Type | Method and Description |
---|---|
MailSession |
create()
Initialise mail session
Unless disabled, if a mail Session can be found in JNDI, then just manage
be a simple wrapper; otherwise configure the session as specified in
components.xml
|
String |
getHost() |
String |
getPassword() |
Integer |
getPort() |
javax.mail.Session |
getSession() |
String |
getSessionJndiName() |
String |
getTransport()
Get the transport to used.
|
String |
getUsername() |
static javax.mail.Session |
instance() |
boolean |
isDebug() |
boolean |
isSsl() |
boolean |
isTls() |
void |
setDebug(boolean debug) |
void |
setHost(String host) |
void |
setPassword(String password) |
void |
setPort(Integer port) |
void |
setSessionJndiName(String jndiName) |
void |
setSsl(boolean ssl) |
void |
setTls(boolean tls) |
void |
setTransport(String transport)
Explicitly set the transport to use
|
void |
setUsername(String username) |
clearDirty, setDirty, setDirty
public MailSession()
public MailSession(String transport)
@Unwrap public javax.mail.Session getSession() throws NamingException
NamingException
@Create public MailSession create()
public String getPassword()
public void setPassword(String password)
password
- The password to use to authenticate to the sending
server. If no authentication is required it should be left
empty. Must be supplied in conjunction with username.public String getUsername()
public void setUsername(String username)
username
- The username to use to authenticate to the server. If not
set then no authentication is used. Must be set in conjunction
with password.public boolean isDebug()
public void setDebug(boolean debug)
debug
- Whether to display debug message logging. Warning, very
verbose.public String getHost()
public void setHost(String host)
host
- The host to connect topublic void setPort(Integer port)
public Integer getPort()
public String getSessionJndiName()
public void setSessionJndiName(String jndiName)
public boolean isSsl()
public void setSsl(boolean ssl)
public boolean isTls()
public void setTls(boolean tls)
public String getTransport()
public void setTransport(String transport)
public static javax.mail.Session instance()
Copyright © 2015 Seam Framework. All Rights Reserved.