Results 1 to 5 of 5

Thread: Conditional Membership Provider from email address?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,091

    Conditional Membership Provider from email address?

    I inherited a project whereby a website is utilizing the Membership Provider to allow for new account signups. This site utilizes different domains which point to the same root. In code, different pages are displayed based on which domain was used to connect to the site.

    The Membership Provider sends an email confirmation to the end user upon account signup, based on (I'm guessing) some hard coded config value for that contains the From email address. Is there anyway to conditionally specify this From email address at run time? Or is it only possible to use a hard coded config value for this email address?

    Any help would be appreciated.
    Last edited by softwareguy74; Feb 28th, 2012 at 11:08 AM.

    Visual Studio 2010

  2. #2
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,763

    Re: Conditional Membership Provider from email address?

    Hi.Have a look here:
    http://www.vbforums.com/showthread.php?t=667980
    Although as i also say in this thread i prefer something custom but that is just me.
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

  3. #3
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Conditional Membership Provider from email address?

    Out of the box, the CreateUserWizard will use the from email address that is configured in the SMTP settings in your applications web.config file.

    There is nothing to stop you overriding this in the events of the CreateUserWizard, such that the email is sent from a different email address.

    Gary

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,091

    Re: Conditional Membership Provider from email address?

    Quote Originally Posted by gep13 View Post
    Out of the box, the CreateUserWizard will use the from email address that is configured in the SMTP settings in your applications web.config file.

    There is nothing to stop you overriding this in the events of the CreateUserWizard, such that the email is sent from a different email address.

    Gary
    Thanks for the info. This definitely sounds like the way to do it. I'll take a look at this.

    Visual Studio 2010

  5. #5
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Conditional Membership Provider from email address?

    Quote Originally Posted by softwareguy74 View Post
    Thanks for the info. This definitely sounds like the way to do it. I'll take a look at this.
    Not a problem at all. Let me know how you get on, and whether you have any follow up questions.

    Gary

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width