简体   繁体   English

如何将电子邮件通知发送到包含URL的电子邮件地址

[英]How to send email notification to an email address including URL

I have an application It was developed by my colleague, but he has been overloaded and gave it to me, the requester needs a changes. 我有一个应用程序,它是由我的同事开发的,但是他已经超负荷工作并交给了我,请求者需要进行更改。 there is a page including text-boxes and dropdown list fields, when user fills all fields and submits the button, while submitting an email notification must be sent to one group (there is the email address of that group) with link of this filled page with full information . 有一个包含文本框和下拉列表字段的页面,当用户填写所有字段并提交按钮时,在提交电子邮件通知时必须将电子邮件通知发送到包含此填充页面链接的一个组(该组的电子邮件地址)有充分的信息。

When the user receives the email and opens the link he should be able to see all fields with information which filled by the first user recently, but all fields must be invisible without one ddl, and this second user (which received the email notification) be able to change the ddl data and submit the button. 当用户收到电子邮件并打开链接时,他应该能够看到第一位用户最近填写的所有信息字段,但是所有字段都必须是不可见的,且没有一个ddl,而第二位用户(接收到电子邮件通知)为能够更改ddl数据并提交按钮。 then same procedure should be repeated for the third user like a workflow How to send the URL which has ID (modifySite.aspx?id=453) via link as email notification and how this process continues? 那么应该像工作流那样对第三位用户重复相同的过程。如何通过链接将具有ID(modifySite.aspx?id = 453)的URL作为电子邮件通知发送,并且此过程如何继续?

I need you to help me how to do this 我需要你帮我怎么做

Ok, so what I understood is you need to send unique URLs to each group so that they can see only data relevant to them, and by clicking on that URL they can see your form with all the data but some controls should be disabled for them, if I have understood correctly then, 好的,所以我了解到您需要向每个组发送唯一的URL,以便他们只能看到与其相关的数据,并且通过单击该URL,他们可以看到包含所有数据的表单,但是应禁用某些控件。 ,如果我理解正确的话,

You can do something like this 你可以做这样的事情

Every time you want to send email with the link, 每当您要发送带有链接的电子邮件时,

  1. You can create encryption key for each and append that in your url, so you url becomes something like domain.aspx?something=sadsad34sa1 (remember to log it in your DB with Id) 您可以为每个密钥创建加密密钥,并将其添加到URL中,这样您的URL就会变成domain.aspx?something=sadsad34sa1 (请记住使用ID将其记录在数据库中)
  2. On you page load event, get the query string, decrypt it, match it in your DB, now you will get the appropriate Id, based on that you can do your binding stuff in your page. 在页面加载事件中,获取查询字符串,对其进行解密,在数据库中进行匹配,现在您将获得适当的ID,基于此,您可以在页面中进行绑定。
  3. If you dont find that decrypted key (which your got by query string in #2), then link is invalid. 如果找不到该解密的密钥(您在#2中通过查询字符串获得的密钥),则链接无效。

You can also keep link Expiry Date in your same table where you are keeping encrypted/decrypted keys and just need to add one more condition in your page load. 您还可以将链接到期日期保存在保存加密/解密密钥的同一表中,只需要在页面加载中添加一个条件即可。

Hope it helps. 希望能帮助到你。

For some related code refer this: Trying to encrypt a random key for password reset functionality 有关一些相关代码,请参考以下内容: 尝试对随机密钥进行加密以实现密码重置功能

http://www.aspsnippets.com/Articles/Encrypt-and-Decrypt-QueryString-Parameter-Values-in-ASPNet-using-C-and-VBNet.aspx http://www.aspsnippets.com/Articles/Encrypt-and-Decrypt-QueryString-Parameter-Values-in-ASPNet-using-C-and-VBNet.aspx

http://www.c-sharpcorner.com/forums/how-to-encrypt-and-decrypt-the-url-in-asp-net-with-c-sharp-or-vb-net http://www.c-sharpcorner.com/forums/how-to-encrypt-and-decrypt-the-url-in-asp-net-with-c-sharp-or-vb-net

http://www.dotnetfunda.com/articles/show/748/url-encryption-in-aspnet http://www.dotnetfunda.com/articles/show/748/url-encryption-in-aspnet

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM