package com.reyun.task;

import com.reyun.util.MailUtils;

import java.util.List;

/**
 * Created by Administrator on 2017/5/6 0006.
 * desc:邮件发送线程
 */
public class EmailThread
        extends Thread {

    private String title;
    private String content ;
    private List<String> receiver;

    public EmailThread(){}

    public EmailThread(String title, String content, List<String> receiver)
    {

        this.setName("SendEmailThread");
        this.title = title;
        this.content = content;
        this.receiver=receiver;
    }

    @Override
    public void run(){
        try {
            MailUtils.sendHtmlEmail(title,content,receiver);
        } catch (Exception e) {
            e.printStackTrace();
        }

    }

}
