|
|
@ -5,6 +5,9 @@ import cn.estsh.i3plus.pojo.base.enumutil.ImppEnumUtil;
|
|
|
|
import org.junit.Test;
|
|
|
|
import org.junit.Test;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.mail.MessagingException;
|
|
|
|
|
|
|
|
import java.io.UnsupportedEncodingException;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @Description :
|
|
|
|
* @Description :
|
|
|
|
* @Reference :
|
|
|
|
* @Reference :
|
|
|
@ -23,7 +26,13 @@ public class TestMailUtil extends TestBase {
|
|
|
|
mailUtil.setSubject("中文");
|
|
|
|
mailUtil.setSubject("中文");
|
|
|
|
mailUtil.setContentType(ImppEnumUtil.MESSAGE_TYPE_CONTENT.HTML.getDescription());
|
|
|
|
mailUtil.setContentType(ImppEnumUtil.MESSAGE_TYPE_CONTENT.HTML.getDescription());
|
|
|
|
mailUtil.setBody("内容");
|
|
|
|
mailUtil.setBody("内容");
|
|
|
|
mailUtil.send();
|
|
|
|
try {
|
|
|
|
|
|
|
|
mailUtil.send();
|
|
|
|
|
|
|
|
} catch (UnsupportedEncodingException e) {
|
|
|
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
|
|
|
} catch (MessagingException e) {
|
|
|
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|