commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maria maria <>
Subject Html mail sent to gmail or hotmail is received as attachment file
Date Tue, 29 Dec 2009 14:41:47 GMT
I wrote an email, which has the HTML email and its plain text email related
to it.
When I receive that mail in a webmail it shows as plain text with the html
file as an attachment, though if i receive it in Outlook it shows perfect
html email.
It looks like gmail, hotmail, etc in their webmail don't permit HTML mail,
but I receive lots of newsletters with different fonts and colors in my
webmail of gmail, hotmail, etc.
Any idea how they do it?

My code is:

HtmlEmail email = new HtmlEmail();
  email.setFrom("", "Mi nombre");
  email.setAuthentication("envio@ <envio@d>", "mypassword");

  email.addTo(emailAddress, name);
  email.setSubject("the subject");
  email.setTextMsg("Doesn't support HTML email ");

 private final static String creaContenido(NoticiaVO noticia) {
  String salida = "";
  salida += "<html> ";
  salida += "<head> </head> <body> ";
  salida += "<h3> "+noticia.getTitulo() +"</h3>";
  salida += "<p> <em> "+noticia.getEntradilla()+"</em></p>";
  salida += " <p>"+noticia.getCiudad()+". - ";
  salida += noticia.getAutor()+" <br/> "+noticia.getContenido()+"</p>";
  salida += "</body> </html>";
  return salida;

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message