Package net.sf.colossus.webserver
Class ColossusMail
- java.lang.Object
-
- 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
Fields Modifier and Type Field Description 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
Constructors Constructor Description ColossusMail(WebServerOptions options)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
-
-
-
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 interfaceIColossusMail
- Parameters:
username
- Name of user of which registration is ongoingemail
- email address to where to send the mailconfCode
- 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.
-
-