O'Reilly logo

Spring Roo 1.1 Cookbook by Ashish Sarin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Sending e-mails using JavaMail API

Spring framework provides classes such as JavaMailSenderImpl , SimpleMailMessage , and so on, which simplify sending e-mails via JavaMail API. In this recipe, we'll look at Roo commands that help with the configuration of these classes. To verify that the emailing feature in our application is working correctly, we'll send an e-mail via Gmail.

Getting ready

Create a new directory C:\roo-cookbook\ch06-email in your system. Copy the ch06_web_app.roo script to the ch06-email directory. If you are using a different database than MySQL or your connection settings are different than what is specified in the script, then modify the script accordingly.

Start the Roo shell from the ch06-email directory and execute the

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required