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