Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 968 Bytes

README.md

File metadata and controls

19 lines (13 loc) · 968 Bytes

Sending emails in Java

This tutorial shows how to send emails in Java. The libraries used in the tutorial project are javax.mail and javax.activation.

To customise the project to make sure it runnable, you need to change the following values in SendEmail class to fit with your project.

  • Properties of the mail server. In my example, I use gmail.
  • username and password for PasswordAuthentication class.
  • Replace [email protected] with a real email.

Next improvements/updates:

  • Discover the differences between javax.mail and com.sun.mail.
  • Send HTML messages.

References

Sign in with App Passwords

How To Send Email In Java Using Gmail SMTP?

Java - Sending Email | Tutorials Point