Java Mail is like a client, it doesn't do anything mail-wise. You need to install a STMP service (smtpHost) on your computer. JavaMail knows how to speak to a STMP service to receive and send mail. For Example, I have Linux installed with Sendmail to send/receive mail. Sendmail controls the receiving (Saved as a big text file for each user). So, install a mail server before you can start playing with JavaMail.