2

I have a scenario here.

  • We want new user for the application to register.
  • Upon initial/ temporary registration completion, we need to email them a link for verification (like all standard user based WebApplications will do).

I am planning to use CreateUserWizard control in Asp.Net, which could send an email, if the credentials are provided.

As per my knowledge,

we can send this email by providing required credentials and the SMTP server details and that is it. The link in the email will bring back client to one of confirm Registration pages with a unique Id as query string. (as we add the link in email)

My question is, can we do this verification, by sending email as above without having some Emailing Component implemented or I am missing something.

NOTE: using SqlServer 2005, C#

Thanks

2 Answers 2

3

You might find this page a good tutorial on verifying users by sending them an email. As Mitchel said, you will need an SMTP server (either your own, or from a provider). You can get details of any free providers off a search. Quick details for

            Gmail:
            Host = "smtp.gmail.com"
            Port = 587

            Hotmail:
            Host = "smtp.live.com"
            Port = 587

You can configure your SMTP details in your web.config file like so (below uses the hotmail SMTP server):

<system.net>
    <mailSettings>
      <smtp from="[email protected]">
        <network host="smtp.live.com" port="587" userName="[email protected]" password="mypassword"/>
      </smtp>
    </mailSettings>
  </system.net>

If you decide to use a free SMTP server like above, then make sure you follow their rules and stay within their usage limits.

2
1

You must have a SMTP Server that you can use to send the e-mail through, but as long as you have an e-mail account with SMTP, you do not need to do anything else special to send the e-mail.

Just be sure to properly configure the SMTP client in .NET, either manually or via the web.config via the System.Net configuration node.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.