O'Reilly logo

J2EE™ Applications and BEA™ WebLogic Server™ by Sandra L. Emerson, Rob Woollen, Michael Girdley

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

JavaMail Best Practices

Here are some best practices you can follow when using JavaMail in your WebLogic Server applications:

Using JavaMail to Confirm Email Addresses

When a user registers for your site, your application probably asks for the user's correct email address. Use JavaMail to send an email from your system to validate the email address. To have users confirm that they have correctly received the email, have them revisit your site using a URL that you provide in the body of the mail.

The URL that the user clicks in the email you send should be unique for that user. You can encapsulate a unique value into that URL by including it as an HTTP POST: http://myhost.com/validate?token=someuniquevalue

Once the user revisits your site with ...

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