blob: 84397d5f71c53c80d72659e47864248c9c604ac4 [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
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}