// Create some PRoperties and get the default Session. Properties props = System.getProperties(); props.put("mail.host", host); props.put("mail.transport.protocol", "smtp");
// Set debug on the Session so we can see what is going on // Passing false will not echo debug info, and passing true // will. mailSession.setDebug(sessionDebug);
// Instantiate a new MimeMessage and fill it with the // required information. Message msg = new MimeMessage(mailSession);