Send mail containing inline image through SMTP in java

22 Views Asked by At

How to add inline image to mail to sent it through SMTP in Java?

helper.addInline("contentid", resource);

where resource is ByteArrayResource.

But I am getting NullPointerEcxeption before this line exactly.

helper is MimeMessageHelper.

0

There are 0 best solutions below