public class EMLComposer
extends java.lang.Object
Constructor and Description |
---|
EMLComposer() |
Modifier and Type | Method and Description |
---|---|
protected T |
_this() |
java.lang.String |
compose(Email email)
Creates EML string from given
Email . |
java.lang.String |
compose(ReceivedEmail receivedEmail)
Creates EML string from given
ReceivedEmail . |
static EMLComposer |
create() |
protected javax.mail.Session |
createSession(java.util.Properties properties)
Creates new
Session with or without custom Properties . |
protected java.util.Properties |
getProperties()
Returns the
Properties . |
protected javax.mail.Session |
getSession()
Returns the
Session . |
T |
set(java.util.Properties properties)
Copies properties from given set.
|
T |
set(java.lang.String name,
java.lang.String value)
Sets property for the
Session . |
T |
useDefaultSession()
Uses default
Session . |
public static EMLComposer create()
public java.lang.String compose(Email email)
Email
.email
- Email
from which to create EML String
.String
with EML content.public java.lang.String compose(ReceivedEmail receivedEmail)
ReceivedEmail
.receivedEmail
- ReceivedEmail
from which to create EML String
.String
with EML content.protected T _this()
protected javax.mail.Session getSession()
Session
.Session
.protected java.util.Properties getProperties()
Properties
.Properties
.protected javax.mail.Session createSession(java.util.Properties properties)
Session
with or without custom Properties
.properties
- Custom properties to be used during Session
creation. It is acceptable is this value is null
.Session
with any custom Properties
public T set(java.util.Properties properties) throws MailException
Session
is already created, exception will be thrown.properties
- Properties
to set.MailException
- if the Properties
has already been set.public T set(java.lang.String name, java.lang.String value)
Session
. If Session
is already created, an exception
will be thrown.name
- Property name to set.value
- Property value to set.MailException
- if the Properties
has already been set.public T useDefaultSession()
Session
. Any property will be ignored.System.getProperties()
Copyright © 2003-present Jodd Team