How to confirm email addrees in spring MVC web application?

Among other tools you can use "java mail" package to send emails direclty from your application. Here's the link to API docs Java Mail API.

Among other tools you can use "java mail" package to send emails direclty from your application. Here's the link to API docs Java Mail API So the scenario could be like the following: User account is created. It's in unconfirmed state now; You generate a unique confirmation ID to your applicaiton.

The easiest way is to use java.util.UUID.randomUUID().toString(). UUID is a random globally unique value. ; You store the ID (e.g.0123)+account to the database for future use; Send the URL+ID (http://yourapp.com/confirm?id=0123) as an email using javamail to the user; Do not show the ID in browser now; The user checks inbox and see your letter; The user clicks the link and request is sent to your site confirmaion servlet; Confirmation servlet will search for the account associated with the specified confirmation id; Confirmaion servlet set account to "confirmed state" as obvously the user has access to the specified mail box.

How can I generate the ID because user can chnage that manually as well and I don't want to accidently interfere with other users ID – John Mar 11 at 14:48 i've updated the answer: – fukanchik Mar 11 at 15:08 The easiest way is to use java.util.UUID.randomUUID().toString(); – fukanchik Mar 11 at 15:08.

Use Java Mail Api to create a e-mail with confirmation. Also, you need to generate unique id to confirm the user - this info can be stored in db. After the moment user clicks on your confirmation link you should set user in 'Confirmed' state.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions