SourceForge.net Logo
Version: 0.27 - Last update: 2004-05-30 Home Page - SourceForge Project Page - Contact

Jodd
  Overview
  News
  Download
  License
  References

Development
  Using Jodd
  Javadoc
  JUnit report

Community
  Contribute
  Report a bug

More reading
  Milestone 0.30



Top 25%

BSD
 

E-mail

jodd.mail package contains some email-based classes that may helps in sending e-mails. The example speeks better than words:

Simple e-mail
 
SmtpServer smtpServer = new SmtpServer("mail.provider.com");
SendMail.setDefaultSmtpServer(smtpServer);

Email email = new Email();
email.setFrom("najgor@source.com");
email.setTo("weird@destindation.com");
email.setSubject("test");
email.setMessage("a test message");
SendMail.send(email);

Email class is made to be more coder-friendly than Suns javamail classes. Email class also contains some more functionalities:
  • one or more TO, CC and/or BCC address,
  • message can be send as HTML,
  • message date may be set,
  • headers also.

Attachments

Attachments are also easy to set with Email class. Currently, attachments may be simple added to Email object as:
  • HTML string,
  • file.

SMTP Authentication

SmtpServer supports simple SMTP authentification.


http://jodd.sourceforge.net
najgor at users.sourceforge.net