You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Joe Lam <jo...@moni-media.net> on 2007/09/11 10:23:26 UTC

[Email] embed() is locking my image files

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


Re: [Email] embed() is locking my image files

Posted by Ben Speakmon <bs...@apache.org>.
Hi Joe,

Sorry to hear you're having problems. Would you kindly open a bug at
issues.apache.org/jira for this? Once you do I'll be happy to look into it
further.

Also, can you please state in the bug your version of Tomcat, Java, your
OS/kernel info, etc.? That will help a lot as well.

Thanks,
--Ben

On 9/11/07, Joe Lam <jo...@moni-media.net> wrote:
>
>
> 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
>
>