Quantcast
Channel: Programação - GUJ
Viewing all articles
Browse latest Browse all 33093

Caracter especial copiado do word

$
0
0

@joaoimporta escreveu:

Estou utilizando o código abaixo, para envio de e-mail, porém quando eu copio um texto do word, por exempo "joao silva", ele substitui o " por ?, ficando ?joao silva?, alguém poderia me ajudar ?

MimeMessage message = new MimeMessage(mailSession); // Set From: header field of the header. message.setFrom(new InternetAddress(from)); InternetAddress[] listaDestinatarios = new InternetAddress[listaDest.length]; int counter = 0; for (String recipient : listaDest) { listaDestinatarios[counter] = new InternetAddress(recipient.trim()); counter++; } message.setRecipients(Message.RecipientType.BCC, listaDestinatarios); message.setSubject(assunto,"UTF-8"); message.setText(assunto,"UTF-8"); String cid = "abc123"; BodyPart messageBodyPart = new MimeBodyPart(); String htmlText = "
Comunicado Nº "+diretoriaSigla+"/"+gerenciaSigla+"/"+codComunicado+"/"+ano+"http://%5C"; messageBodyPart.setContent(htmlText, "text/html"); // add it // Create a multipar message Multipart multipart = new MimeMultipart(); multipart.addBodyPart(messageBodyPart);

Mensagens: 1

Participantes: 1

Ler tópico completo


Viewing all articles
Browse latest Browse all 33093


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>