解决方案

  • MimeMessageHelper 的执行顺序错了,先执行 setText() 然后执行 addInline() 添加图片
  • <img src="cid:p03"/>

    原因分析 官方文档

Inline resources are added to the MimeMessage by using the specified Content-ID (identifier1234 in the above example).   
The order in which you add the text and the resource are very important.   
Be sure to first add the text and then the resources.  
 If you are doing it the other way around, it does not work.
扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。