commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Lam <joe....@moni-media.net>
Subject [Email] embed() is locking my image files
Date Tue, 11 Sep 2007 08:23:26 GMT

I am sending email with embeded image. the image is local files, not online
image like thoe examples in official site. everything goes fine except the
local image files are locked (cannot delete/update). of course I can delete
the file after I shutdown the server (tomcat).

the codes are like:

File image = something...
URL url = new URL("file:///"+image.getAbsolutePath());
String filename = image.getName();
String cid = embed(url, filename);
... insert cid in the html mail content


anyone know why the local image files are being locked??
sound like forget to close() something. but the commons email API is pretty
simple. hardly to find something to close :confused:

Thank you very much.

Joe

-- 
View this message in context: http://www.nabble.com/-Email--embed%28%29-is-locking-my-image-files-tf4421045.html#a12610229
Sent from the Commons - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message