I am trying to send an e-mail with an embedded image. I used the approach below rather than using the <img> tag so that the image will immediately appear when email is viewed. When using the <img> tag, the recipient would have only the option to download the image which is not what I need. So, as you can observed, the approach used DataSource fds = new FileDataSource("C:\\images\\jht.gif");
, which actually works but I'm working at a web app. So, we I deploy this to other environments, this would not work. I think I need a relative path but I don't know how. Or other approach that would allow me to do this. Thanks!
credit to http://www.rgagnon.com/javadetails/java-0504.html
for the above approach.