parent
8467102c47
commit
d752de723e
@ -0,0 +1,36 @@
|
|||||||
|
package com.xjs.domain.mall;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邮箱发送实体
|
||||||
|
*
|
||||||
|
* @author xiejs
|
||||||
|
* @since 2022-04-13
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class MailBean implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -2116367492649751914L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邮件接收人
|
||||||
|
*/
|
||||||
|
private String recipient;
|
||||||
|
/**
|
||||||
|
* 邮件主题
|
||||||
|
*/
|
||||||
|
private String subject;
|
||||||
|
/**
|
||||||
|
* 邮件内容
|
||||||
|
*/
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件地址
|
||||||
|
*/
|
||||||
|
private String absolutePath;
|
||||||
|
|
||||||
|
}
|
After Width: | Height: | Size: 993 B |
@ -0,0 +1,12 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Title</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h3 th:text="|尊敬的${username} :|"></h3><br />
|
||||||
|
<img th:src="@{images/i.png}" /> 您有代金券即将到期,逾期失效,请尽早使用。<a th:href = "${url}" >点此查看</a>
|
||||||
|
<br />
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -0,0 +1,41 @@
|
|||||||
|
package com.xjs.server;
|
||||||
|
|
||||||
|
import com.xjs.XjsWarningApp;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
|
||||||
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xiejs
|
||||||
|
* @since 2022-04-13
|
||||||
|
*/
|
||||||
|
@SpringBootTest(classes = XjsWarningApp.class)
|
||||||
|
class MailServerTest {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private MailServer mailServer;
|
||||||
|
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void sendSimpleMail() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void sendHTMLMail() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void sendAttachmentMail() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void sendInlineMail() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void sendTempLateMail() {
|
||||||
|
mailServer.sendTempLateMail("1294405880@qq.com","生哥","这是标题");
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue