Ol�s,
Eu estou tentando enviar e-mail com seu cont�udo em html.
Se algu�m puder me ajudar, agrade�o muito!
J� tentei diversas maneiras, mas nenhuma d� certo... O e-mail chega
como texto comum.
O c�digo segue abaixo:
public void createAndSendMail(EMailMessage eMess) throws
MailerAppException
{
try
{
InitialContext ic = new InitialContext();
Session session = (Session)ic.lookup(JNDINames.MAIL_SESSION);
// construct the message
MimeMessage msg = new MimeMessage(session);
msg.setFrom();
msg.setRecipients(Message.RecipientType.TO,
InternetAddress.parse(eMess.getEmailReceiver(),
false));
msg.setSubject(eMess.getSubject());
// Essa linha que est� o problema
msg.setContent(eMess.getHtmlContents(), "text/html");
msg.setSentDate(new Date());
// send the mail off
Transport.send(msg);
} catch (Exception ex) {
throw new MailerAppException("Failure while sending mail");
}
}
--
Nilo Garcia Silveira
Estagi�rio
Visual Systems Informatica Ltda.
Oracle Partner Program
http://www.visualsystems.com.br
Tel: (17) 2124425 R. 31
------------------------------ LISTA SOUJAVA ----------------------------
http://www.soujava.org.br - Sociedade de Usu�rios Java da Sucesu-SP
d�vidas mais comuns: http://www.soujava.org.br/faq.htm
regras da lista: http://www.soujava.org.br/regras.htm
para sair da lista: envie email para [EMAIL PROTECTED]
-------------------------------------------------------------------------