I have written the following code for sending email using javamail API through SMTP as TLS as SSL is not supported but I ended up with the following exception. Please see my
If you don't want to use SSL, and you're using smtp instead of smtps try these settings
mail.smtp.starttls.enable=false mail.transport.protocol=smtp