title: Unable to send emails on Google App Engine
body: <p>I have tried to use Javamail to send emails. However, I received the following message:</p>
  
  <pre><code>javax.mail.SendFailedException: Send failure (javax.mail.MessagingException: Illegal Arguments (java.lang.IllegalArgumentException: Bad Request: ))
  </code></pre>
  
  <p>I have tried to send emails from the admin account (that I use to upload the app), as well as the user account I login to the app as. (from <code>UserService - getCurrentUser().getEmail()</code>) both failed.</p>
  
  <p>I'm wondering whether there's any special setting I have to setup?</p>
  
  <pre><code>    Properties props = new Properties();
      Session session = Session.getDefaultInstance(props, null);    
      Message msg = new MimeMessage(session);
      UserService userService = UserServiceFactory.getUserService();
      String email = userService.getCurrentUser().getEmail();
      //Or
      //String email = "my_admin_account@gmail.com";
      msg.setFrom(new InternetAddress(email));
      msg.addRecipient(Message.RecipientType.TO,
                       new InternetAddress("some_test_email@gmail.com"));
      msg.setSubject("Test Email");
      msg.setText("Nobody");
      Transport.send(msg);
  </code></pre>