通过电子邮件发送给用户的链接 [英] sent link to user via email
问题描述
http://stackoverflow.com/questions/10719722/asp-net-app-to-send-an-mail-with-a-hyperlink [ ^ ]
试试这个链接
http://www.techrepublic.com/article/sending-e-mail-via-aspnet/5766248 [ ^ ]
没有直接的解决方案。你需要使用加密和一些盐。对于每天您需要生成一个字符串,该字符串将从服务器端进行验证。甚至你需要检查链接是来自同一个IP地址还是来自不同的地址(如果你想限制用户)。
其中一个方法是,
你可以使用MD5和一些盐。首先得到当前日期。并在添加salt(一些预定义的字符串)后应用MD5。将此烘焙加密字符串传递到URL以便在电子邮件中下载。
在服务器端,您已经拥有当前日期。你需要在服务器端执行相同的过程。获取日期,添加日期盐并生成MD5。如果两个MD5匹配然后弹出下载,否则你可以提示一些消息。
你还需要考虑这种方法的本地化。如果您将使用服务器日期,则不会发生此问题。所以最好的选择是使用服务器日期。
祝你好运
-Amit
i m developing one application now i have made one accounting software and i have my websites on this there is some information about this software with this i have put one link called download demo now whenever click on this link one inquiry form is open in that user fill his inquiry for this software with compulsary field email address now whenever he press submit button the link will send to his email and he can download this demo of software now that link should be random number and not like www.xyz.com/test.aspx?demosoftware and after 24 hours that link should be disappeare to that user..... i have complete mailing module to simple one mail will send to him but how should i mail this link to him???please anyone help me ...
http://stackoverflow.com/questions/10719722/asp-net-app-to-send-an-mail-with-a-hyperlink[^]
Try this Link
http://www.techrepublic.com/article/sending-e-mail-via-aspnet/5766248[^]
Hi,
There is no straight forward solution for this. you need to use encryption along with some salt. for every day you need to generate one string and that string will be validated from the server side. Even you need to check if the link is from the same ip address or from the different(in case you want to restrict users).
One of the way is,
You can use MD5 along with some salt. First get the current date. and apply MD5 on that after adding salt(some predefined string). Pass this baked encrypted string to the URL for download in the email.
On the server side you already have the current date. you need to do the same process on the server side. get the date, add salt with the date and generate MD5. If both MD5 match then popup for the download, otherwise you can prompt some message.
You also need to consider localization for this methodology. If you will use Server date then this issue will not happen. so best option is to use server date.
Best luck
-Amit
这篇关于通过电子邮件发送给用户的链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!