package com.mail.utils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import javax.mail.*;
import javax.mail.internet.MimeMessage;
import javax.mail.search.SearchTerm;
import javax.mail.search.SubjectTerm;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Properties;
import java.util.TreeSet;
/**
* 使用POP3协议解析邮件工具类
*
* @author bytearr.
*/
@Component
public class ParseEmailUtils {
//从配置文件获取
//邮箱名称
@Value("${mail.emailAddress}")
private String emailAddress;
//邮箱授权码 非密码
@Value(("${mail.password}"))
private String password;
/**
* 获取邮箱信息
*
* @pa