A SMTP server is always required to be able to send emails, like as a HTTP server is always required to be able to send webpages. This is regardless of the website and the mail API you're using. A HTTP server is not the same as and does usually not include a SMTP server.
You could make use of the SMTP server associated with your own existing email account, such as the one from your ISP or public mailboxes like Gmail, Yahoo, etc. You can find SMTP connection details at their documentation. You usually just need to know the hostname and the port number. The login details are just the same as from your email account.
With the ISP/public mailboxes you're however restricted to using only your own address in the From
field of the email and usually also in the amount of emails you're allowed to send at certain intervals. If you'd like to get around this, then you need to install your own SMTP server, for example Apache James, which is Java based, or Microsoft Exchange and so on.
Once you have a SMTP server, then you'll be able to send emails using the JavaMail API or eventually the more convenienced Apache Commons Email.
I forgot to add, if you're using 3rd party web hosting, then it's good to know that most of those 3rd party web hosting providers also offers a SMTP server as well. You'd like to consult the hosting features and figure the connection details in their documentation.