Expand my Community achievements bar.

SOLVED

Subscribe functionality with verification e-mail

Avatar

Level 3

I want to create a form that allows the users of my site to subscribe to my mailing list. When a user fills in their e-mail address and submits, I want an verification e-mail to be sent to the specified e-mail address. The e-mail should include a verification link and only when this link has been accessed should the lead become active.

How can this be accomplished using AEM? 

1 Accepted Solution

Avatar

Correct answer by
Administrator

Hi AEMing

Please read the following articles and you can implement your OSGI doing the same.

Only major thing to do here is to create an activation key that would be associated with particular user/Email, store this key in DB and send that key to the user in form of URL. So once User clicks that URL(this URL would be verification along with activation key, eg. “Abc.com/verify?email=xyz@email.com&hash=lksdjljljljsj"), the key would be send as GET parameters back to the server, and this would get verified at server end by comparing it with Activation key stored in DB/MEM cache like Redis.

The following article will tell you the whole process in PHP, that we can incorporate in AEM as an OSGI.

Link: - http://code.tutsplus.com/tutorials/how-to-implement-email-verification-for-new-members--net-3824

 

I hope this would help you.

 

Thanks and Regards

Kautuk Sahni



Kautuk Sahni

View solution in original post

2 Replies

Avatar

Correct answer by
Administrator

Hi AEMing

Please read the following articles and you can implement your OSGI doing the same.

Only major thing to do here is to create an activation key that would be associated with particular user/Email, store this key in DB and send that key to the user in form of URL. So once User clicks that URL(this URL would be verification along with activation key, eg. “Abc.com/verify?email=xyz@email.com&hash=lksdjljljljsj"), the key would be send as GET parameters back to the server, and this would get verified at server end by comparing it with Activation key stored in DB/MEM cache like Redis.

The following article will tell you the whole process in PHP, that we can incorporate in AEM as an OSGI.

Link: - http://code.tutsplus.com/tutorials/how-to-implement-email-verification-for-new-members--net-3824

 

I hope this would help you.

 

Thanks and Regards

Kautuk Sahni



Kautuk Sahni

Avatar

Employee Advisor

 In your form submission handler generate a random activation key and store that key with user details (email etc.) in CRX as node. You can trigger the verification email by configuring a launcher on the create event  of the user details node. For verification, you can write a custom AEM servlet which would basically validate whether the activation key in the request parameter matches with the stored user node or not. If it matches then it will mark the user as active lead.  And in the verification email you can generate a link to this servlet with activation key  as request parameter.  And as last step you can write a custom background job to clean up the user nodes which are not activated within a time period.