For convenience of testing, please let me know how you would like to send emails without authenticating your account and password using gmail smtp.
HtmlEmail email = new HtmlEmail();
Properties props = System.getProperties();
props.put("mail.smtp.host", "smtp.gmail.com");
props.put("mail.smtp.port", 465);
props.put("mail.smtp.auth", false);
email.setSslSmtpPort("465");
email.setCharset("UTF-8");
email.addTo("test@gmail.com", "toTest");
email.setFrom("test@gmail.com", "fromTest");
email.setSubject("test title");
email.setHtmlMsg("<html><body>hellow world</body></html>");
email.setCharset("UTF-8");
email.send();
Session session = Session.getDefaultInstance(props, null);
email.setMailSession(session);
I used the above code but it doesn't work properly. If gmail smtp can not be used without authentication, please let me know other smtp services.