How to Send Email in Java Using Apache Commons
www.quickprogrammingtips.com › java › how-to-sendimport org.apache.commons.mail.DefaultAuthenticator; import org.apache.commons.mail.Email; import org.apache.commons.mail.SimpleEmail; // Java program to send simple email using apache commons email // Uses the Gmail SMTP servers public class SimpleEmailSender { private static final String HOST = "smtp.gmail.com"; private static final int PORT = 465; private static final boolean SSL_FLAG = true; public static void main(String[] args) { SimpleEmailSender sender = new SimpleEmailSender ...