Subscribe functionality with verification e-mail | Community
Skip to main content
AEMing
Level 2
October 16, 2015
Solved

Subscribe functionality with verification e-mail

  • October 16, 2015
  • 2 replies
  • 1186 views

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? 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by kautuk_sahni

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

2 replies

kautuk_sahni
Community Manager
kautuk_sahniCommunity ManagerAccepted solution
Community Manager
October 16, 2015

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
Kunal_Gaba_
October 16, 2015

 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.