注册时发送确认邮件。 [英] Sending confirmation mail while registeration .

查看:97
本文介绍了注册时发送确认邮件。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

海曼。我创建了一个注册和登录表单的应用程序..我需要在用户注册我的应用程序时向用户发送确认邮件。检查那个id是否属于他们..我不知道这样做..请帮助我任何人..谢谢提前

解决方案

你好,

在userTable中保留一个标记,如'active'或其他东西。还要保留'verificationCode'字段。在注册时设置active = false并生成随机数/字符串,将其设置为验证码。加密用户ID并使用此

加密的用户ID和验证码向用户发送电子邮件。

喜欢



您的激活如:www.example.com/user/activate.aspx?code=jsjfgj*#098s@zkdfhsskdjfh

您的验证码:1245AS3



在activate.aspx页面中,提供输入验证码的选项。当用户提交,decript userID并检查它是否是有效的验证码,如果是设置为active = true。

就够了。



你可以也可以在没有验证码的情况下进行。在这种情况下,您只需要激活链接。如果用户点击此链接,则解密userID并在页面加载事件时激活用户。


Hai guys. i created an apps with registration and log in form .. my need is wants to send confirmation mail to the user while they register my apps. to check whether that id is belongs to them ..i don't have any idea to do this .. please help me anyone ..Thanks in advance

解决方案

Hi,
Keep a flag in userTable like 'active' or something. also keep a 'verificationCode' feild. At the registration time set active=false and generate a random number/string, set it to verification code. encrypt userID and send an email to user with this
encrypted userid and verification code.
like

Your activation like : www.example.com/user/activate.aspx?code=jsjfgj*#098s@zkdfhsskdjfh
Your verification code : 1245AS3

In activate.aspx page give an option to enter verification code. when user submit, decript userID and check is it valid verification code, if yes set active =true.
thats enough.

you can also do it without verification code.In this case you need only the activation link. if user hit this link, decrypt userID and activate user at page load event.


这篇关于注册时发送确认邮件。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆