org.apache.camel.component.mail
Class MailUtils

java.lang.Object
  extended by org.apache.camel.component.mail.MailUtils

public final class MailUtils
extends Object

Mail utility class.

Parts of the code copied from Apache ServiceMix.

Version:
$Revision: 13690 $

Field Summary
static int DEFAULT_PORT_IMAP
           
static int DEFAULT_PORT_IMAPS
           
static int DEFAULT_PORT_NNTP
           
static int DEFAULT_PORT_POP3
           
static int DEFAULT_PORT_POP3S
           
static int DEFAULT_PORT_SMTP
           
static int DEFAULT_PORT_SMTPS
           
static String PROTOCOL_IMAP
           
static String PROTOCOL_IMAPS
           
static String PROTOCOL_NNTP
           
static String PROTOCOL_POP3
           
static String PROTOCOL_POP3S
           
static String PROTOCOL_SMTP
           
static String PROTOCOL_SMTPS
           
 
Method Summary
static String dumpMessage(Message message)
          Gets a log dump of the given message that can be used for tracing etc.
static int getDefaultPortForProtocol(String protocol)
          Returns the default port for a given protocol.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_PORT_SMTP

public static final int DEFAULT_PORT_SMTP
See Also:
Constant Field Values

DEFAULT_PORT_SMTPS

public static final int DEFAULT_PORT_SMTPS
See Also:
Constant Field Values

DEFAULT_PORT_POP3

public static final int DEFAULT_PORT_POP3
See Also:
Constant Field Values

DEFAULT_PORT_POP3S

public static final int DEFAULT_PORT_POP3S
See Also:
Constant Field Values

DEFAULT_PORT_NNTP

public static final int DEFAULT_PORT_NNTP
See Also:
Constant Field Values

DEFAULT_PORT_IMAP

public static final int DEFAULT_PORT_IMAP
See Also:
Constant Field Values

DEFAULT_PORT_IMAPS

public static final int DEFAULT_PORT_IMAPS
See Also:
Constant Field Values

PROTOCOL_SMTP

public static final String PROTOCOL_SMTP
See Also:
Constant Field Values

PROTOCOL_SMTPS

public static final String PROTOCOL_SMTPS
See Also:
Constant Field Values

PROTOCOL_POP3

public static final String PROTOCOL_POP3
See Also:
Constant Field Values

PROTOCOL_POP3S

public static final String PROTOCOL_POP3S
See Also:
Constant Field Values

PROTOCOL_NNTP

public static final String PROTOCOL_NNTP
See Also:
Constant Field Values

PROTOCOL_IMAP

public static final String PROTOCOL_IMAP
See Also:
Constant Field Values

PROTOCOL_IMAPS

public static final String PROTOCOL_IMAPS
See Also:
Constant Field Values
Method Detail

getDefaultPortForProtocol

public static int getDefaultPortForProtocol(String protocol)
Returns the default port for a given protocol.

If a protocol could not successfully be determined the default port number for SMTP protocol is returned.

Parameters:
protocol - the protocol
Returns:
the default port

dumpMessage

public static String dumpMessage(Message message)
Gets a log dump of the given message that can be used for tracing etc.

Parameters:
message - the Mail message
Returns:
a log string with important fields dumped


Copyright © 2007-2010 IONA Open Source Community. All Rights Reserved.