JavaMail The program sends messages to any number of mails. To be able to add attachments to messages, you just need to specify the path.