Código:
Y enviaba así:
message.setText("Correo <br>" + "<b>enviado </b> desde <i>java</i>.","ISO8859-1","html");
Código:
Por esto ahora:
Transport t = session.getTransport("smtp");
t.connect("[email protected]","password");
Código:
El problema es que ahora setText no me permite enviar html, ¿cómo puedo solucionarlo? Authenticator auth = new SMTPAuthenticator();
Session session = Session.getInstance(props, auth);
// -- Create a new message --
Message msg = new MimeMessage(session);
// -- Set the FROM and TO fields --
msg.setFrom(new InternetAddress("[email protected]"));
msg.addRecipients(Message.RecipientType.BCC, addresses);
msg.setSubject(emailSubject);
msg.setText(emailBody);
//msg.setText(emailBody,"ISO-8859-1", "html");
// -- Set some other header information --
msg.setSentDate(new Date());
Transport.send(msg);
Gracias!


