blob: a15d8905c83e111991d7f9682178b1ad7233f9dd [file] [log] [blame]
margarethaaecee1b2018-02-20 14:44:21 +01001package de.ids_mannheim.korap.service;
2
3import javax.mail.Authenticator;
4import javax.mail.PasswordAuthentication;
5
margaretha6b3ecdd2018-03-01 18:23:56 +01006/** Defines Authenticator for creating javax.mail.Session.
7 *
8 * @see src/main/resources/default-config.xml
9 *
10 * @author margaretha
11 *
12 */
margarethaaecee1b2018-02-20 14:44:21 +010013public class MailAuthenticator extends Authenticator {
14
15 private PasswordAuthentication passwordAuthentication;
16
17 public MailAuthenticator (String username, String password) {
18 passwordAuthentication = new PasswordAuthentication(username, password);
19
20 }
21
22 @Override
23 protected PasswordAuthentication getPasswordAuthentication () {
24 return passwordAuthentication;
25 }
26
27}