+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / CreateUserWizard control - sending email

CreateUserWizard control - sending email

5 posts, 0 answered
  1. Louis Farrell
    Louis Farrell avatar
    37 posts
    Registered:
    24 May 2010
    09 Sep 2010
    Link to this post
    Hey,

    I have followed this post on how to force newly created users to enable their accounts, and have managed to get it all to work EXCEPT for the actual emailing part. I can get a user to register and not be able to log into their account, until i visit manually visit the confirmation page (and putting their username as the query string), which then enables their account, and gives them access. But the email never sends, so the user will never know where to go to activate their account!

    Looking at the code i don't see anywhere where the email actually sends? There's no:

    SmtpClient client = new SmtpClient();
    client.Send(e.Message);

    or anything i can see for it to send; but even with these extra lines in, it still doesnt send.

    Does anyone have any thoughts??

    Many thanks in advance!
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    09 Sep 2010
    Link to this post
    Hello Louis Farrell,

    In the sample I use CreateUserWizard.SendingMail Event - Occurs before the user is sent an e-mail confirmation that an account has been created and CreateUserWizard.MailDefinition - gets a reference to a collection of properties that define the characteristics of the e-mail message sent to new users.

    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Louis Farrell
    Louis Farrell avatar
    37 posts
    Registered:
    24 May 2010
    09 Sep 2010
    Link to this post
    Thanks for replying so fast!

    So your example should send an email then?? Also, I am now getting an error in CreateUserWizardControl.ascx.cs with

    this.manageProfile.SetProfileProperties(CreateUserWizard1.UserName);

    telling me that, " 'CreateUserWizardControl' does not contain a definition for 'manageProfile' and no extension method 'manageProfile' accepting a first argument of type 'CreateUserWizardControl' could be found (are you missing a using directive or an assembly reference?)".

    Does this use a specific namespace that i am not using? i'm using:

    using System;
    using System.Web;
    using System.Web.UI;
    using System.Net.Mail;
    using System.Web.UI.WebControls;
    using System.Collections.Generic;
    using System.Text;
    using Telerik.Security;


    Should i be using another?

    Thanks Ivan so far!
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    09 Sep 2010
    Link to this post
    Hello Louis Farrell,

    ManageProfile is a custom control that is used in Sitefinity/UserControls/Login/CreateUserWizard.ascx. The control manages profile data.

    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Louis Farrell
    Louis Farrell avatar
    37 posts
    Registered:
    24 May 2010
    09 Sep 2010
    Link to this post
    That probably explains my problem then, i don't have that ascx file. I have CreateUserWizardControl.ascx in /Sitefinity/UserControls/Login/, but not CreateUserWizard.ascx.

    Whereabouts could i download this?

    Thanks!
Register for webinar
5 posts, 0 answered