net.sf.colossus.webserver
Class ColossusMail

java.lang.Object
  extended by net.sf.colossus.webserver.ColossusMail
All Implemented Interfaces:
IColossusMail

public class ColossusMail
extends java.lang.Object
implements IColossusMail

Encapsulates the way how the web server sends mail in some situations, so far only for registration procedure.

Author:
Clemens Katzer

Field Summary
private  java.lang.String contactMail
           
private  java.lang.String contactWWW
           
private  java.lang.String fromAddress
           
private  java.lang.String fromName
           
private static java.util.logging.Logger LOGGER
           
private  java.lang.String mailServer
           
private  java.io.File mailToFileFile
           
private  boolean mailToFileFlag
           
private  java.lang.String mailToFileName
           
private  boolean reallyMail
          Whether or not to really send a mail.
private  java.lang.String thisServer
           
 
Constructor Summary
ColossusMail(WebServerOptions options)
           
 
Method Summary
 java.lang.String sendConfirmationMail(java.lang.String username, java.lang.String email, java.lang.String confCode)
          Request from the ColossusMail object to send the mail (with the confirmationCode) to the given email address, in order to complete the registration of user username
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGGER

private static final java.util.logging.Logger LOGGER

mailServer

private final java.lang.String mailServer

fromAddress

private final java.lang.String fromAddress

fromName

private final java.lang.String fromName

thisServer

private final java.lang.String thisServer

contactMail

private final java.lang.String contactMail

contactWWW

private final java.lang.String contactWWW

reallyMail

private final boolean reallyMail
Whether or not to really send a mail. During development on PC I set this in the cf file to false, because I do not really have a mail server process running.


mailToFileName

private final java.lang.String mailToFileName

mailToFileFile

private final java.io.File mailToFileFile

mailToFileFlag

private final boolean mailToFileFlag
Constructor Detail

ColossusMail

public ColossusMail(WebServerOptions options)
Method Detail

sendConfirmationMail

public java.lang.String sendConfirmationMail(java.lang.String username,
                                             java.lang.String email,
                                             java.lang.String confCode)
Description copied from interface: IColossusMail
Request from the ColossusMail object to send the mail (with the confirmationCode) to the given email address, in order to complete the registration of user username

Specified by:
sendConfirmationMail in interface IColossusMail
Parameters:
username - Name of user of which registration is ongoing
email - email address to where to send the mail
confCode - the code user has to provide in the gui field in order to complete the registration
Returns:
The reason why it failed, or null if all is fine.