Setting up Membership with PasswordRecovery

Discussion in 'Site Programming, Development and Design' started by DavidLJ, May 10, 2010.

  1. I am having trouble with emailing a Membership password. The Membership service is working OK, and I can log in with a password. I now want to email users with a forgotten password. I have set up an email account for [email protected], and added a mailSettings section to the web.config file as follows

    <system.net>
    <mailSettings>
    <smtp>
    <network
    host="mail.mysite.co.uk"
    userName="admin"
    password="******" />
    </smtp>
    </mailSettings>
    </system.net>

    I have then added a PasswordRecovery control with a mail definition of

    <MailDefinition
    From="[email protected]"
    Subject="Password Reminder">
    </MailDefinition>

    When I press the submit button I get the error massage from the server of

    Mailbox unavailable. The server response was: <user email from Membership table> No such user here

    Any help on correctly setting this up is appreciated
     
  2. Ray

    Ray

    The user name you are typing to log into the SMTP server is incorrect.

    The user name will be the full and active email address. As an example [email protected].

    We will not know the password, only you will know that.
     
  3. Many thanks - that worked in the sense that the PasswordRecovery control generated the email with the password. The only problem is that the email was returned as undeliverable with the message

    The original message was received at Mon, 10 May 2010 18:59:26 +0100 (BST)
    from smg03.internetmailserver.net [64.79.170.152]

    ----- The following addresses had permanent fatal errors -----

    (reason: 553 5.1.8 ... Domain of sender address [email protected] does not exist)

    ----- Transcript of session follows -----
    ... while talking to tehain.invictawiz.com.:
    >>> MAIL From: SIZE=1929
    <<< 553 5.1.8 ... Domain of sender address [email protected] does not exist
    501 5.6.0 Data format error

    The user Admin appeared to be set up OK, but I have now tried sending an email from [email protected], and get a similar returned email. The email facility is shown as Enabled, so is there something I have not done to get email working?
     
  4. Ray

    Ray

    (reason: 553 5.1.8 ... Domain of sender address [email protected] does not exist)

    This error means that the login to the smtp server you are using doesn't exist. Bear in mind that you first need to log into our SMTP server before it will send out the email, and you need to use an existing POP address. As an example [email protected]

    mysite.com is an example, I don't know what your domain name is but you will replace mysite.com as your domain name.
     
  5. I thought I had done this by manually logging in though mail.mysite.co.uk/login.aspx. Also how does this work when I am sending an email from the PasswordRecovery control on a web page in the site.

    Thanks for the very swift reply, Ray
     
  6. Ray

    Ray

    I'm really not sure exactly what you have done and I am assuming that mysite.co.uk is an example domain name because you don't want your true domain name displayed on the thread.

    So I have to go what the error is and what it means.

    Now this error...

    (reason: 553 5.1.8 ... Domain of sender address [email protected] does not exist)

    I pretty straight forward and you need to make sure that it exist as a POP account. Bear in mind there is a difference between POP account and Alias so you need to make sure you create it as a POP account.
     
  7. The problem is now resolved. It only affected my email address and was due to a setup error by my ISP
     
  8. Cool deal, glad to hear that you got it worked out.
     

Share This Page