title: Including Image in Velocity Template using Spring
body: <p>Trying to set an image as logo. Html is placed in velocity template.</p>
  
  <pre><code> ApplicationContext appContext = new FileSystemXmlApplicationContext();
   Resource resource = appContext.getResource( "file:/D:/img/x.png" );
   MimeMessage message = sender.createMimeMessage();
   MimeMessageHelper helper = new MimeMessageHelper( message,
                                                       true,
                                                       "UTF-8" );
   helper.addInline( "imageContent",
                      new File( resource.getURI() ));
   //code to send the message
  
   In .vm file,
        &lt;img src=\"cid:imageContent\"/&gt;
  </code></pre>
  
  <p>The image is not being rendered in the e-mail. What am I doing wrong here?
  If I send the image as an attachment, it is being rendered properly.</p>