• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Confirm email registration using CF

Guest
May 04, 2011 May 04, 2011

Copy link to clipboard

Copied

We have a form for users to subscribe to email newsletters. They sometime put in bad email addresses, so I want to create the form so it then sends out an email with a confirmation link. Once they have clicked the link, then they are approved and get the newsletters.

Is this possible using Coldfusion? If so, any suggestions of where to start would be very gratefully received.

TOPICS
Advanced techniques

Views

1.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
May 04, 2011 May 04, 2011

Copy link to clipboard

Copied

Of course it's possible!

As it's no longer a stateful transaction, you'll need to store some details in a database. Here's what I'd do:

User signs up, which inserts a row into your "pending_signups" table, which has an id, any dates you want and the email address. You then email the person with a link to a confirmation page with a url parameter of the signup id. Whether you choose to encrypt this is up to you, depends on the system.

When the user hits the link, the confirmation page checks the id from the url and signs up the stored email address to your mailing list.

Job done.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 04, 2011 May 04, 2011

Copy link to clipboard

Copied

I'll have a go and hopefully it should be no problem for a newcomer like me. I've got an expert in the office to quiz as I go. Cheers

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
May 27, 2011 May 27, 2011

Copy link to clipboard

Copied

Hi barrow,

If I read part of your post correctly, portion displayed below. You are indicating the receipt of a bad e-mail address and that you want to send a confirmation to the bad e-mail address for them to confirm submission. If the e-mail address is bad not sure how the confirmation with subsequent link is going to make it to the destination.

barrow0204 wrote:

They sometime put in bad email addresses, so I want to create the form so it then sends out an email with a confirmation link.

Now given that the submitted e-mail address is valid/good, then Owain's information would to me be the preferred way to verify that the person for whom the e-mail address belongs to in fact does want to receive your information and is not being submitted without their consent or knowledge.

Another option to consider although will not verify bad or good, is to have them enter the e-mail address twice. Then on submission use the compare function to check to see if they entered the e-mail address exactly the same. This would at least attempt to catch any typos the submitter may have done.

Leonard B

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 27, 2011 May 27, 2011

Copy link to clipboard

Copied

LATEST

Regarding the suggestion to enter the email address twice - whenever I see that on a page, I enter it once then copy and paste.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation