首页>代码>java发送邮件代码,即实现纯代码客户端发送邮件>/MailSend/src/com/test/mail/MyAuthenticator.java
package com.test.mail;

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

/**
 * 建立发送身份验证
 */
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);
	}
}
最近下载更多
hbsoft2008  LV16 2023年10月19日
annazhang  LV29 2023年4月8日
chanxyer  LV6 2021年7月13日
luesjim  LV11 2021年6月18日
zhaojialiang  LV7 2021年5月14日
whdbhm  LV3 2021年2月23日
pxqtsht  LV15 2021年1月28日
xuexizhuanyong23  LV16 2021年1月23日
咕噜红  LV4 2020年9月4日
yxq330521  LV11 2020年7月30日
最近浏览更多
lzx602  LV3 4月15日
gao123456789  LV6 3月7日
hbsoft2008  LV16 2023年10月19日
ZhangGb 2023年9月2日
暂无贡献等级
luoxici 2023年5月16日
暂无贡献等级
annazhang  LV29 2023年4月7日
Tuxxxxx  LV3 2023年1月3日
1358849392  LV21 2022年12月27日
微信网友_6040315240812544  LV8 2022年11月21日
kahvia  LV1 2022年5月8日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友