How to detect user email address when user clicks on a link sent to their email?
-
Hi, I want to detect the user email address when the user clicks on a link sent to their email, the following: 1. From my c# windows application I send an email to (a@y.com,b@y.com) and in the cc (c@y.com). 2. when the user open his email and click an a link inside the email body, this link will open a web page, I want to know the user who clicked the link. is (a@y.com or b@y.com or c@y.com). Please let me know if it is possible an how to do that Thank You
-
Hi, I want to detect the user email address when the user clicks on a link sent to their email, the following: 1. From my c# windows application I send an email to (a@y.com,b@y.com) and in the cc (c@y.com). 2. when the user open his email and click an a link inside the email body, this link will open a web page, I want to know the user who clicked the link. is (a@y.com or b@y.com or c@y.com). Please let me know if it is possible an how to do that Thank You
The only option you have is to include the users email address in your link. The site would have to parse out the email address from the URL parameters.
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
Dave Kreskowiak -
Hi, I want to detect the user email address when the user clicks on a link sent to their email, the following: 1. From my c# windows application I send an email to (a@y.com,b@y.com) and in the cc (c@y.com). 2. when the user open his email and click an a link inside the email body, this link will open a web page, I want to know the user who clicked the link. is (a@y.com or b@y.com or c@y.com). Please let me know if it is possible an how to do that Thank You
Dave suggests one way, but another is to add a query code to the link. Make it unreadable - a Guid is fine - and use that value to lookup in your "sent emails" database which user email address it was sent to. This way, you don't expose any sensitive info, and it's not possible (or at least feasible in a reasonable timeframe) to give a fake email and then confirm it without the actual email sent by you. It's also simple to "expire" confirmations. What you end up with is a URL that is readable, copy'n'pasteable, or clickable, but preety much impossible to guess:
mydomain.com/register.aspx?ec=50660b24af1f4056afc292ed3f9cece1
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
-
Hi, I want to detect the user email address when the user clicks on a link sent to their email, the following: 1. From my c# windows application I send an email to (a@y.com,b@y.com) and in the cc (c@y.com). 2. when the user open his email and click an a link inside the email body, this link will open a web page, I want to know the user who clicked the link. is (a@y.com or b@y.com or c@y.com). Please let me know if it is possible an how to do that Thank You
As the other answers have pointed out, you need to include something in the link to identify the address you sent it to. What might not be obvious is that this means you cannot send the same link to multiple addresses and expect to identify which one clicked the link. That means you need to send different messages to
a@y.com
,b@y.com
, andc@y.com
. If there are multiple addresses in the "To" field, or you're using both "To" and "Cc", you cannot determine which recipient clicked the link.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer