This commit is contained in:
Looly
2022-05-05 13:47:40 +08:00
parent 78a5c53d98
commit fd0948ca3c
3 changed files with 49 additions and 37 deletions

View File

@@ -66,4 +66,15 @@ public class MailTest {
final Properties props = account.getSmtpProps();
Assert.assertEquals("true", props.getProperty("mail.debug"));
}
@Test
@Ignore
public void sendHtmlWithPicsTest() {
HashMap<String, InputStream> map = new HashMap<>();
map.put("abc", FileUtil.getInputStream("D:/test/abc.png"));
map.put("abcd",FileUtil.getInputStream("D:/test/def.png"));
MailUtil.sendHtml("loolly@aliyun.com", "测试", "<h1>邮件来自Hutool测试</h1><img src=\"cid:abc\"/><img src=\"cid:abcd\"/>",
map);
}
}