X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=crawler%2Fkiss%2Fsrc%2Forg%2Fwamblee%2Fcrawler%2Fkiss%2FMailServer.java;h=768d6e7a8e98d4f45085664183a55bf93840383f;hb=7e86d075a568401dc93f0f58b10dd458357a48fd;hp=b814e36ebe3cd131cd7115424719739b3e7d6f8c;hpb=bd7ff4fd9e484dfe7c723c3b1e12fddc03efc9ea;p=utils diff --git a/crawler/kiss/src/org/wamblee/crawler/kiss/MailServer.java b/crawler/kiss/src/org/wamblee/crawler/kiss/MailServer.java index b814e36e..768d6e7a 100644 --- a/crawler/kiss/src/org/wamblee/crawler/kiss/MailServer.java +++ b/crawler/kiss/src/org/wamblee/crawler/kiss/MailServer.java @@ -11,6 +11,9 @@ import javax.mail.Session; import org.apache.commons.mail.Email; import org.apache.commons.mail.EmailException; +/** + * Mail server. + */ public class MailServer { private String _host; @@ -18,14 +21,27 @@ public class MailServer { private String _username; private String _password; - public MailServer( - String aHost, int aPort, String aUsername, String aPassword) { + /** + * Constructs the mail server interface. + * @param aHost Host name of the SMTP server. + * @param aPort Port name of the SMTP server. + * @param aUsername Username to use for authentication or null if no authentication is + * required. + * @param aPassword Password to use for authentication or null if no authenticatio is + * required. + */ + public MailServer(String aHost, int aPort, String aUsername, String aPassword) { _host = aHost; _port = aPort; _username = aUsername; _password = aPassword; } + /** + * Sends an e-mail. + * @param aMail Mail to send. + * @throws EmailException In case of problems sending the mail. + */ public void send(Email aMail) throws EmailException { Properties props = new Properties(); props.put("mail.transport.protocol", "smtp");