Google App Engine Email
- by Frank
I use the following method to send email in the Google App Engine servlet :
  void Send_Email(String From,String To,String Message_Text)
  {
    Properties props=new Properties();
    Session session=Session.getDefaultInstance(props,null);
    try
    {
      Message msg=new MimeMessage(session);
      msg.setFrom(new InternetAddress(From,"nmjava.com Admin"));
      msg.addRecipient(Message.RecipientType.TO,new InternetAddress(To,"Ni , Min"));
      msg.setSubject("Servlet Message");
      msg.setText(Message_Text);
      Transport.send(msg);
    }
    catch (Exception ex)
    {
      // ...
    }
  }
But it doesn't work, have I missed anything ? Has anyone got the email function working ?