title: Using gmx smtp server with java mail
body: <p>I want to use the gmx smtp server to send some mails with java mail.
  All i get is this exception, the page which i should review in the exception doesnt provide me information how to fix this issue.</p>
  
  <pre><code>com.sun.mail.smtp.SMTPSendFailedException: 553 5.1.7 Complete address with domain, please ( http://portal.gmx.net/serverrules ) {mp032}
  ;
    nested exception is:
          com.sun.mail.smtp.SMTPSenderFailedException: 553 5.1.7 Complete address with domain, please ( http://portal.gmx.net/serverrules ) {mp032}
  </code></pre>
  
  <p>I implemented it in Java as following:</p>
  
  <pre><code>props = new Properties();
  props.put("mail.transport.protocol", "smtp");
  props.put("mail.smtp.host", "mail.gmx.net");
  props.put("mail.smtp.auth", "true");
  props.put("mail.smtp.port", "465");
  props.put("mail.from", "test@test.test);
  props.put("username", "SOMEUSERNAME@gmx.at");
  props.put("password", "SOMEPASS");
  props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
  props.put("mail.smtp.debug", "true");
  
  Authenticator auth = new SMTPAuthenticator(props.getProperty("username"), props.getProperty("password"));
  
  
      if ("true".equals(smtp.getSmtpAuth())) {
          mailSession = Session.getDefaultInstance(props, auth);
      } else {
          mailSession = Session.getDefaultInstance(props);
      }
  
  
  }
  
  class SMTPAuthenticator extends Authenticator {
  
      private String username, password;
  
      public SMTPAuthenticator(String username, String password) {
          this.username = username;
          this.password = password;
      }
  
      @Override
      public PasswordAuthentication getPasswordAuthentication() {
          return new PasswordAuthentication(username, password);
      }
  }
  </code></pre>