Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Use JavaMail in the Geronimo application server

Neal Sanche (neal@nsdev.org), Java developer, Pure Technologies
Author photo
Neal Sanche is a Java developer recently beached in the .NET world and fighting for any ties back to his old, comfortable roots. His experience includes development of several commercial J2EE applications as well as several stand-alone Java applications. In his spare time, he writes music, takes photographs, and writes technical articles. Visit his Web site to see several examples of each. You can contact Neal at neal@nsdev.org.

Summary:  If you've ever wondered how to send e-mail from an Apache Geronimo application, this tutorial is for you. Java™ developer Neal Sanche guides you through developing a simple Struts application for user validation through e-mail links in Geronimo. This tutorial teaches you how to embed JavaMail™ in your Geronimo server, link it to your application, and use it to easily send template-based e-mail through the Velocity Engine directly from your Web application.

Date:  18 Oct 2005
Level:  Intermediate PDF:  A4 and Letter (241 KB | 34 pages)Get Adobe® Reader®

Activity:  4505 views
Comments:  

Before you start

Apache Geronimo is one of the newest, up-and-coming Java 2 Platform, Enterprise Edition (J2EE) platforms for building enterprise applications. One of the first things you might want to do with Geronimo is enable it to send e-mail messages to people when they register with your application. Of course, having an application that can send e-mail is useful for many things -- like updating a Web site user about what's new on your site and validating users to make sure the e-mail addresses they gave you are correct -- so this tutorial focuses on acquiring that functionality.

About this tutorial

This tutorial shows you how to build a new-user registration application, complete with a Velocity template-driven e-mail-sending function, using the Geronimo application server as a host system. The tutorial begins with the basics by describing how to build Geronimo from source (which is necessary to set up the build environment correctly), how to install the server, and how to install the Geronimo Maven plug-in. Eclipse is used for this development, and details are provided on how to integrate Maven with Eclipse for simplified building. Learn first-hand how to start a Maven build system that produces output that can be immediately and automatically deployed on a Geronimo server. See how XDoclet can be used with Maven to perform a lot of the code generation you need to simplify the application-development process. And, of course, learn how to configure your application to be able to send e-mail to people. This tutorial focuses on integrating the Sun Microsystems JavaMail reference implementation with Geronimo, which is necessary, in the short term, while Geronimo's JavaMail implementation is being completed.


Prerequisites

To get the most from this tutorial, you should have experience using Eclipse and Maven and have experience writing J2EE software with an emphasis on Web applications with Struts.


System requirements

You need the following software to complete this tutorial:

1 of 11 | Next

Comments



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Open source
ArticleID=153592
TutorialTitle=Use JavaMail in the Geronimo application server
publish-date=10182005
author1-email=neal@nsdev.org
author1-email-cc=troy@backstopmedia.com

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Try IBM PureSystems. No charge.