Posted By:
Gabriele_Memmi
Posted On:
Tuesday, April 23, 2002 08:36 AM
Hi,I have to set the charset and I used the following code: MimeMessage.setContent(body, "text/plain;charset=WINDOWS-1252"); On the other side if I use Multipart class (see code below) I'm not able to set the charset. Who can help me? Thanks in advance. DataSource source = new FileDataSource(filename); BodyPart messageBodyPart = new MimeBodyPart(); messageBodyPart.setDataHandler(new DataHandler(source)); messageBodyPart.setFileName(filename); Multipart multipart = new MimeMultipart(); multipart.addBodyPart(messageBodyPart); message.setCo
More>>
Hi,I have to set the charset and I used the following code:
MimeMessage.setContent(body, "text/plain;charset=WINDOWS-1252");
On the other side if I use Multipart class (see code below)
I'm not able to set the charset.
Who can help me?
Thanks in advance.
DataSource source = new FileDataSource(filename);
BodyPart messageBodyPart = new MimeBodyPart();
messageBodyPart.setDataHandler(new DataHandler(source));
messageBodyPart.setFileName(filename);
Multipart multipart = new MimeMultipart();
multipart.addBodyPart(messageBodyPart);
message.setContent(multipart);
<<Less