You can search a small mail java libraries and use them, but most of the libraries I've seen look pretty big for this apps. You can make your own classes for the specific work, SMTP protocol is not hard.