commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Siegfried Goeschl <siegfried.goes...@it20one.at>
Subject Re: Html mail sent to gmail or hotmail is received as attachment file
Date Wed, 30 Dec 2009 07:58:08 GMT
Hi,

which version of commons-email are you currently using -
commons-email-1.2 fixed this issues (hopefully)

Cheers,

Siegfried Goeschl



maria maria wrote:
> 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?
> Thanks
> Maria
>
> My code is:
>
> HtmlEmail email = new HtmlEmail();
>   email.setHostName("mail.envio.com");
>   email.setFrom("no-responda@envio.com", "Mi nombre");
>   email.setCharset(HtmlEmail.ISO_8859_1);
>   email.setAuthentication("envio@ <envio@d>envio.com", "mypassword");
>   email.setBounceAddress(envio@envio.com);
>
>   email.addTo(emailAddress, name);
>   email.setSubject("the subject");
>   email.setHtmlMsg(creaContenido(noticia));
>   email.setTextMsg("Doesn't support HTML email ");
>   email.send();
>
>  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;
>  }
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message