Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Use NetBeans to hand-code HTML emails

DZone's Guide to

Use NetBeans to hand-code HTML emails

· Java Zone ·
Free Resource

Get the Edge with a Professional Java IDE. 30-day free trial.

Every so often I need to write an email that contains hand-coded HTML - for example, if I want hyperlinked words or something like that.  In some cases there's probably some feature of my mail client that would do it, but I'd rather just hand code a few HTML tags and get it done with.

Of course, if you copy raw HTML and paste it into an email, you'll get an email with nicely escaped and formatted raw HTML.

So here's a Stupid NetBeans Trick:

  • Create an HTML file (I just keep a scratch HTML file in my home dir for this). 
  • Write your content in HTML
  • Copy and paste it from NetBeans into your mail program

The trick here is that NetBeans will put it on the clipboard with the text/html MIME type.  So instead of ending up with an email full of raw markup, it ends up rendered correctly in your message.

Get the Java IDE that understands code & makes developing enjoyable. Level up your code with IntelliJ IDEA. Download the free trial.

Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}