This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes referencing attachements in mail html text of email Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Beginning Java
Bookmark "referencing attachements in mail html text of email" Watch "referencing attachements in mail html text of email" New topic

referencing attachements in mail html text of email

Divyajot Ahluwalia
Ranch Hand

Joined: Nov 03, 2000
Posts: 46
Dear Friends,
i have been trying to send emails with html content and images in such a manner that the images are attached and the images in the main email links to the attached image. i have tried the following code but i am unable to establish the link.
Please help
the code is:

this is from a jsp page im trying to use
the final email has the image attached but does not show it in the final email's html content.
Please help

(edited by Cindy to format code and put spaces in html strings so that they will display)
[This message has been edited by Cindy Glass (edited December 12, 2001).]
Kajol Shroff
Ranch Hand

Joined: Dec 04, 2000
Posts: 160
I have gone through your code and this is exactly what I want but I am using applets.
Can you tell me which package have you imported so that I can get the Mime Classes.
I am able to send the mail but the mail is comming as a text message whereas actually it is complete html code.
I saw the package and in that the ContentHandler class, but this has a getContent() which takes a URL as parameter. So its of no help as such.
Can you let me know how do I resolve this problem
Have you checked out Aspose?
subject: referencing attachements in mail html text of email
It's not a secret anymore!