SMTP Mail and Password Recovery RRS feed

  • Question

  • User-1852648108 posted

    Has anyone got this function to work?

    My entry in web.config looks like this...



    <smtp deliveryMethod="Network" from=webmaster@mydomain.com >

    <network host="mail.mydomain.com" port="25" userName="myuseraccount />






    The error message I get is as follows:

    Mailbox name not allowed. The server response was: sorry, that domain isn't allowed to be relayed thru this MTA (#5.7.1)


    The users password is being reset but the email is not being sent out. Are my mailsettings incorrect? I have checked the entry for the registered users mailbox and it is in the correct format - xxx@xxx.com. My host does need an explicit authentication account to log into smtp server, which I have provided in the web.config settings. Account has no password.

    Help. Prob something stupid I have done. But having found quite a few coding problems already nothing will surprise me anymore.



    Monday, December 5, 2005 6:43 AM

All replies

  • User39490543 posted
    I am guessing it is because you have only supplied a userName and not a password?

    Check out the documentation for the mailSettings Element.

    Monday, December 5, 2005 7:33 AM
  • User-1852648108 posted
    Thanks. But have also tried with the password element. No luck. Same error message.
    Monday, December 5, 2005 8:04 AM
  • User-1853252149 posted

    Mailbox name not allowed. The server response was: sorry, that domain isn't allowed to be relayed thru this MTA (#5.7.1)

    I think you'll find it's a mail server setting.  Check relay settings for the mail server.


    Thursday, December 8, 2005 4:08 PM
  • User-1852648108 posted

    Hi Jeff. Thanks for your interest...


    Could you please advise exactly what I should be looking for with regard to mail server and relay settings?




    Friday, December 9, 2005 8:05 AM
  • User-1852648108 posted

    I've answered my own query...


    in login.aspx you need to specify a <MailDefinition From> element within the control.

    <MailDefinition From=bloggs@site.com/>


    i.e <asp:PasswordRecovery ID="Passwordrecovery1" runat="server" MailDefinition-From=bloggs@site.com>


    Works for me.




    Friday, December 9, 2005 10:56 AM
  • User-1852648108 posted
    The above answer is a load of rubbish. It was problem with mail server provider after all....
    Saturday, December 10, 2005 7:13 AM
  • User1280082393 posted

    I'm having the same problem, i can't send email out using system.net.mail class i have all the settings in the web.config file. I am using discountasp.net for my host and they say everything on their end is ok, so do you know what is going on? If you find out post something at www.aspnetsource.com  


    <smtp from="support@aspnetsource.com">

    <network host="mail.aspnetsource.com" password="nottelling" userName="aspnetsourc"/>



    Sunday, March 5, 2006 6:53 PM