|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<TransportStrategy>
org.codemonkey.simplejavamail.TransportStrategy
public enum TransportStrategy
Defines the various types of transport protocols and implements respective properties so that a Session
may be configured using a
TransportStrategy
implementation.
Enum Constant Summary | |
---|---|
SMTP_PLAIN
Simplest possible form: only vanilla ".smtp." property names and no extra properties. |
|
SMTP_SSL
SMTPS / SSL transport strategy, that returns the ".smtps." variation of the SMTP_PLAIN version. |
|
SMTP_TLS
NOTE: this code is in untested beta state Uses standard ".smtp." property names (like SMTP_PLAIN ). |
Method Summary | |
---|---|
Properties |
generateProperties()
Base implementation that simply returns an empty list of properties. |
static TransportStrategy |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static TransportStrategy[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final TransportStrategy SMTP_PLAIN
public static final TransportStrategy SMTP_SSL
javax.mail.MessagingException: Exception reading response; nested exception is: javax.net.ssl.SSLException: Unsupported record version Unknown-50.49 (..)
The mail is sent but the exception is unwanted. The property quitwait means If set to false, the QUIT command is sent and the connection is immediately closed. If set to true (the default), causes the transport to wait for the response to the QUIT command
public static final TransportStrategy SMTP_TLS
Uses standard ".smtp." property names (like SMTP_PLAIN
). Additionally the transport protocol is explicitly
set to smtp. Finally, the property "mail.smtp.starttls.enable" is being set to true.
Method Detail |
---|
public static TransportStrategy[] values()
for (TransportStrategy c : TransportStrategy.values()) System.out.println(c);
public static TransportStrategy valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is nullpublic Properties generateProperties()
Properties
instance.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |