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.StringcontactMailprivate java.lang.StringcontactWWWprivate java.lang.StringfromAddressprivate java.lang.StringfromNameprivate static java.util.logging.LoggerLOGGERprivate java.lang.StringmailServerprivate java.io.FilemailToFileFileprivate booleanmailToFileFlagprivate java.lang.StringmailToFileNameprivate booleanreallyMailWhether or not to really send a mail.private java.lang.StringthisServer
-
Constructor Summary
Constructors Constructor Description ColossusMail(WebServerOptions options)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringsendConfirmationMail(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:IColossusMailRequest 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:
sendConfirmationMailin 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.
-
-