package com.lemon.utils;

import org.testng.util.Strings;

import javax.mail.Authenticator;
import javax.mail.PasswordAuthentication;

/**
 * @program: Lemon
 * @description:
 * @author: ray
 * @create: 2022-11-15 16:55
 **/


public class MyAuthenticator extends Authenticator {

    String userName = null;
    String password = null;

    public MyAuthenticator() {
    }

    public MyAuthenticator(String username, String password) {
        this.userName = username;
        this.password = password;
    }

    protected PasswordAuthentication getPasswordAuthentication() {
        return new PasswordAuthentication(userName, password);
    }
}


