Sending Emails (Java)
<p>The code below opens up Outlook Email as soon as a button is pressed.
Is there a way to automatically attach a file to the mail as well along with a subject possibly?</p>

<pre><code>public void onSubmit() {
            try {
                Desktop.getDesktop().browse(new URI("mailto:username@domain.com"));
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            } catch (URISyntaxException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }       
    }
</code></pre>

<p>I tried changing the Desktop line to this. Should this work? Its not compiling though:</p>

<pre><code>                    Desktop.getDesktop().browse(new URI('mailto:username@domain.com?subject=New_Profile&amp;body=see attachment&amp;attachment="xyz.xml"'));
</code></pre>
