[测评系统]--测评系统核心代码库
林致杰
2023-02-14 6c71ce2454f7def4e4c247987ec7daf6971b8eba
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package com.ots.project.tool.email;
 
import javax.mail.*;
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);   
    }   
}