problem using java mail with attachment
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   CSV_Raju
Posted On:   Monday, November 5, 2001 02:35 AM

When i send a mail with an HTML file as an attach through JAVA MAIL then the HTML CODE INCLUDING TAGS are coming in the MAIL MESSAGE BODY.
I was trying to send the file as an attachment but the file content is shown in the MAIL MESSAGE BODY.
Please help and respond at the earliest.

regards,

Avinesh Kumar Singh

Re: problem using java mail with attachment

Posted By:   John_Zukowski  
Posted On:   Thursday, November 8, 2001 09:01 PM

The FAQ already shows how to send HTML content.

Re: problem using java mail with attachment

Posted By:   raj_a  
Posted On:   Thursday, November 8, 2001 02:03 AM

hi,
just check ur code once..
i will give a code for that:

messageBodyPart = new MimeBodyPart();
DataSource source = new FileDataSource(file name);
messageBodyPart.setDataHandler(new DataHandler(source));
messageBodyPart.setFileName(filename);
Transport.send(message);
}

if u had done like this, u wont b occured with that problem.
try this ..
bye
raja.
About | Sitemap | Contact