Web.config>mailSettings

Discussion in 'ASP.NET 2.0' started by infokarenet, Nov 26, 2007.

  1. Hi experts,


    For Login>forgot password?, I set up mailSettings as follows:


    <mailSettings>


    <smtp from="<a target="_blank" href='mailto:[email protected]"><network'>[email protected]">


    <network</A> host="smtp.myhostingsite.net" userName="myusername" password="mypassword" port="25" />


    </smtp>


    </mailSettings>





    Then if the username's email address is in this myhostingsite.net, it's good to send it out.


    But if the username's email address is NOT in this myhostingsite.net, then I have follwoing error messages.


    Can you advise me for this?





    Thanks,


    =========Error messages============


    Mailbox unavailable. The server response was: <[email protected]> No such user here


    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Net.Mail.SmtpFailedRecipientException: Mailbox unavailable. The server response was: <[email protected]> No such user here

    Source Error:





    Code:
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
    Stack Trace:
     
  2. Joseph Jun

    Joseph Jun DiscountASP.NET Staff

    Are those the default settings that were included in the web.config file?

    If you've uploaded your application to the DiscountASP.NET web servers, you'll need to change the from attribute value to a valid e-mail address for your domain that you have hosted. You'll also need to change the host value to localhost and you should be able to leave userName and password as empty strings.

    Winston

    DiscountASP.NET
     
  3. Hi Winston,

    It's working fine with your advice.
    Thanks a lot for your help.
     
  4. Hi All,

    I updated program a few times, then I found "forgot my password" is not working again.
    I didn't change <mailSettings>'s <network host="localhost" userName="" password="" port="25" />but it's not working.

    If I change it for local test like this: <network host="smtp.mylocalserver.com" userName="name" password="password" port="25" />, then it's working fine.


    Any idea?
    Thanks,
     
  5. Hi All,

    I uploaded it again then "forgot my password" is working fine.
    But "Change Your Password" is not working. I have this problem very often repeatedly.

    Any idea?

    Thanks,
     
  6. Hi,
    I had the same problem, I'm trying to send confirmation email to the new registered user, but I've got this exception:
     
  7. it's working!!! :)
     
  8. <system.net>
    <mailSettings>
    <smtp>
    <network host="localhost" port="25"/>
    </smtp>
    </mailSettings>
    </system.net>
     
  9. Post Edited (prujohn) : 1/25/2008 6:55:47 PM GMT
     

Share This Page