Skip to content

Commit

Permalink
spring boot发送邮件
Browse files Browse the repository at this point in the history
  • Loading branch information
eacdy authored and limu.zl committed Mar 21, 2019
1 parent 76849d1 commit c5b8b96
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public String inlineAttach() throws MessagingException {
MimeMessageHelper messageHelper = new MimeMessageHelper(message, true);
messageHelper.setFrom(this.mailProperties.getUsername());
messageHelper.setTo("[email protected]");
messageHelper.setSubject("内嵌附件的邮件测试");
messageHelper.setSubject("内联附件的邮件测试");
// 第二个参数表示是否html,设为true
messageHelper.setText("<h1>HTML内容..<img src=\"cid:attach\"/></h1>", true);
messageHelper.addInline("attach", new ClassPathResource("wx.jpg"));
Expand Down

0 comments on commit c5b8b96

Please sign in to comment.