Posts

Showing posts from January, 2014

Best way to send an email using Java

Which email type should I send: Html or Plain text , why? Well, html is nicer (and links are clickable, and font could be bolded etc) but may cause more problems because some email clients might not be able to read it, not to mention smartphones or other devices which might prefer plain text emails. My suggestion is to send two emails, an html one and a plain text one - bundled together (multipart email) and let the email client decide which it wants to read. But we still have some hurdles: Not all email clients read CSS Some firewalls might block html Some firewalls might block images. So what should I do? - I think the best option is to eliminate as much obstacles as necessary in the html version of the email, and then send it bundled with a plain text email which should cover all cases. So lets by eliminating obstacles. CSS can't be read by many email clients? - Don't use CSS in your emails. HTML isn't supported? Bundle a plain text email