I can't really see anything wrong with this code although I am unable to test it. Have you got any further with it?



Have you set:



props.put("mail.smtp.host", host);