Question

Many applications use emails for accounts verification and other different purposes.You can see that those emails contain Buttons that redirect you to a certain page with a url parameters(ex:http://users/1234....).

How can I do the same functionality if I am constructing the email programmatically using MailMessage utility.

Was it helpful?

Solution

Basicly the Confirmation you talking about is a process. So, for example,

  • create a user with a guid and a ConfirmationDate in a database table.
  • sent a mail with a link and the guid
  • if the user clicks the link you set the ConfirmationDate
  • if the user has a ConfirmationDate (not null) the user has confirmed

OTHER TIPS

Set mail.IsBodyHtml to true and use HTML.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top