title: Send email in via Java using Postfix
body: <p>I am currently developing a web application based on Java EE, JSF, EJB etc. This application is deployd on a Debian 7.6 and there is Postfix installed. </p>
  
  <p>I can use something like this to send emails via commandline:</p>
  
  <blockquote>
    <p>/usr/bin/mailx -s "SUBJECT" -a "From: from@email.de" to@email.de</p>
  </blockquote>
  
  <p>This is working so far. </p>
  
  <p>My attempt is, to use this line and run it as linux command in Java. Is that correct? </p>
  
  <p>Can I use JavaMail for this (send email via postfix) and if so, how can I set up the config for this?</p>
  
  <p>I am really struggeling with this part of my webapplication. Maybe you can help me to find out, what the best solution is. </p>