https://blog.aspose.com/email/connect-to-smtp-servers-using-java/
Connect to SMTP Server using Java