01: /**
02: * @author garethc
03: * 29/10/2002 10:22:15
04: */package vqwiki;
05:
06: import org.apache.log4j.Logger;
07:
08: import javax.mail.Authenticator;
09: import javax.mail.PasswordAuthentication;
10:
11: public class WikiMailAuthenticator extends Authenticator {
12:
13: private static final Logger logger = Logger
14: .getLogger(WikiMailAuthenticator.class);
15:
16: /**
17: *
18: */
19: protected PasswordAuthentication getPasswordAuthentication() {
20: Environment en = Environment.getInstance();
21: PasswordAuthentication passwordAuthentication = new PasswordAuthentication(
22: en.getStringSetting(Environment.PROPERTY_SMTP_USERNAME),
23: en.getSmtpPassword());
24: logger.debug("Authenticating with: " + passwordAuthentication);
25: return passwordAuthentication;
26: }
27: }
|