This week's book giveaways are in the Refactoring and Agile forums. We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line! See this thread and this one for details.
Unable to send email using JavaMail API:getting error Must issue a STARTTLS command first. o1sm34552
posted 3 years ago
I am trying to send email using java mail API. I tried to run code (below in the email) but am getting error below error message:
com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must issue a STARTTLS command first. o1sm34552478pax.2 - gsmtp
Below is the code I am using:
Please advice how to get rid of this error message and send mail successfully.