Attachment of dynamically generated gif file?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   ravikant_mohite
Posted On:   Saturday, December 14, 2002 07:36 AM

Hi guys How can i attach dynamically generated image(gif) file with mail using jsp. This image file is getting generated through cgi script. And file is not residing on server while sending the mail. I am getting "java.io.IOException: No content" exception. This is the Code, MimeBodyPart body3 = new MimeBodyPart(); URL url1 = new URL("http://sever-name /wi/bin/nswi.dl!/cookie/wiqt/queryTechnique/ExtractHtml?sEntry=wi00000001&TS=997086731&sPath=/Document/eastern/g0000000.gif"); URLDataSource urlsrc1 = new URLDataSource(url1); DataHandler dh1 = new DataHandler(urlsrc1); multipart.addBod   More>>

Hi guys

How can i attach dynamically generated image(gif) file
with mail using jsp. This image file is getting generated
through cgi script. And file is not residing on server
while sending the mail. I am getting "java.io.IOException: No content" exception.

This is the Code,



MimeBodyPart body3 = new MimeBodyPart();


URL url1 = new URL("http://sever-name
/wi/bin/nswi.dl!/cookie/wiqt/queryTechnique/ExtractHtml?sEntry=wi00000001&TS=997086731&sPath=/Document/eastern/g0000000.gif");


URLDataSource urlsrc1 = new URLDataSource(url1);


DataHandler dh1 = new DataHandler(urlsrc1);


multipart.addBodyPart(body3);


message.setContent(multipart);


Transport.send(message);

Please help me.
thanks in Advance.

   <<Less

Re: Attachment of dynamically generated gif file?

Posted By:   John_Zukowski  
Posted On:   Sunday, December 15, 2002 07:09 AM

Try reading the results into a byte array and attaching that.
About | Sitemap | Contact