The javax.mail and Apache Commons Email both provide an API for sending an email from Java. It is built on top of the JavaMail API, which it aims to simplify.
If you need a project, you can build an email client using Java FX and use mail API there to send mails.
If you need help, you can also check out Advanced Java programming with JavaFx: Write an email client course on Udemy