PlanetJava
Custom Search

java-sun-javamail-general
[Top] [All Lists]

AW: Show HTML-Mail with Inline-Images

Subject: AW: Show HTML-Mail with Inline-Images
Date: Tue, 25 Jan 2005 17:00:53 +0100
Thanks for reply!
Does anybody know how to save the inline-image?
THX in advance!
Fibo 
-----Ursprüngliche Nachricht-----
Von: Leandro Rodrigo Saad Cruz [mailto:[email protected]] 
Gesendet: Montag, 24. Januar 2005 14:16
An: Fibo
Cc: [email protected]
Betreff: Re: Show HTML-Mail with Inline-Images
Hi Fibo. I didn't solve this problem on a java based webmail product we
developed (www.email2.com.br), but I have a suggestion.
When you receive the message, you have to remove all cid references as
attachments and save then in a directory accessible to your browser/client
AND parse the HTML part to refer to this new swapped elements. For example :
<img src="cid:image_name"> becomes
<img src="http://yourhost/yourdir/image_name";>
I thinks thats the only way to do it ! It's a PITA ! 
On Sun, 2005-01-23 at 13:04 -0700, Fibo wrote:
> Hi Mike,
> 
> thanks for your reply.
> 
> My SMTP-Solution sends the image inline with cids, which works fine..
> Outlook and Thunderbird display the mail correct (the image is 
> embedded in the html-mail. it is not shown as an attachment!).
> 
> The HTML-Text-Part references the image like <img 
> src=\"cid:image_name\">
> 
> The image itself is an own bodypart:
> MimeBodyPart textpart_img = new MimeBodyPart(); DataSource fds = new 
> FileDataSource(html_img); textpart_img.setDataHandler(new 
> DataHandler(fds)); textpart_img.setHeader("Content-ID", 
> "<image_name>");
> 
> Finally i combine the HTML-Text-part with the concering image-part as
> follows:
> MimeMultipart mp_related = new MimeMultipart("related"); 
> mp_related.addBodyPart(textpart); 
> mp_related.addBodyPart(textpart_img);
> 
> Now I´m working on a POP3-Solution and I don't know how to display 
> this multipart-Mail with the image...
> 
> Do you or anybody else know how to solve this problem?
> 
> Thanks in advance!
> 
> Greetings,
> Fibo
> 
> ======================================================================
> ===== To unsubscribe, send email to [email protected] and include 
> in the body of the message "signoff JAVAMAIL-INTEREST".  For general 
> help, send email to [email protected] and include in the body of 
> the message "help".
> 
===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff JAVAMAIL-INTEREST".  For general help, send email to
[email protected] and include in the body of the message "help".
msgmiddle
<Prev in Thread] Current Thread [Next in Thread>
  • AW: Show HTML-Mail with Inline-Images,
Current Sitemap | © 2012 planetjava | Contact | Privacy Policy