jSyncManager Simple Java Server

org.jSyncManager.SJS.Adapters.SMTPServer.util
Class SMTPUtils

java.lang.Object
  extended by org.jSyncManager.SJS.Adapters.SMTPServer.util.SMTPUtils

public class SMTPUtils
extends java.lang.Object

Utility class to assist with some commonly performed SMTP functionality. Should probably be static.

Author:
Torben Werner

Field Summary
static java.lang.String addressRegex
          Simple email expression.
static java.lang.String groupedAddressRegex
          The same as addressRegex except that it puts the user in group 1 and the domain in group 2 E.G.
 
Constructor Summary
SMTPUtils()
           
 
Method Summary
static boolean isValidAddress(java.lang.String address)
          Checks whether an e-mail address is correct (regex might need to change according to our standard)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

addressRegex

public static final java.lang.String addressRegex
Simple email expression. Doesn't allow numbers in the domain name and doesn't allow for top level domains that are less than 2 or more than 3 letters. TO-DO: Check with Brad for what we consider an acceptable regex for valid e-mail addresses

See Also:
Constant Field Values

groupedAddressRegex

public static final java.lang.String groupedAddressRegex
The same as addressRegex except that it puts the user in group 1 and the domain in group 2 E.G. for some address of the form "xyz@example.com" group 1 in the regex will contain "xyz" and group 2 will contain "example.com"

See Also:
Constant Field Values
Constructor Detail

SMTPUtils

public SMTPUtils()
Method Detail

isValidAddress

public static boolean isValidAddress(java.lang.String address)
Checks whether an e-mail address is correct (regex might need to change according to our standard)

Parameters:
address - the address string to be validated
Returns:
true if the address is valid, false otherwise

jSyncManager Simple Java Server

Copyright (c) 2004 Brad BARCLAY. All Rights Reserved.