File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Multiple Attachments for EMail Message Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Multiple Attachments for EMail Message" Watch "Multiple Attachments for EMail Message" New topic
Author

Multiple Attachments for EMail Message

Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1490
    
    1
For some reason the folloing code produces an email containing two files with the same name( name of the last file in the array). One will have the appearance of a pdf file the other a generic icon appearance.

>
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

I have severe lack of coffee but here's a possible hint, Think about what's happening to p2......


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1490
    
    1
Thanks, I finally figured that p2 has to be defined as new on each iteration. Works great. Thanks for the help.
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

No worries Steve, I was pretty sure you'd spot it
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Multiple Attachments for EMail Message