System.InvalidOperationException: The SMTP host was not specified.

Last post 10-22-2009 2:59 PM by fxjamy. 7 replies.

Sort Posts:

  • System.InvalidOperationException: The SMTP host was not specified.

    01-21-2006, 6:12 PM
    • Member
      25 point Member
    • zygote_home
    • Member since 12-20-2005, 11:15 PM
    • Posts 5

    I'm getting an System.InvalidOperationException: The SMTP host was not specified. when I try to use 2.0 password reset. I am using hashed password and  when it trys to send email with new password I getting the above error

    Thanks

  • Re: System.InvalidOperationException: The SMTP host was not specified.

    01-21-2006, 8:10 PM
    • Contributor
      7,249 point Contributor
    • whighfield
    • Member since 01-02-2006, 10:37 PM
    • Winterpeg, Manitoba
    • Posts 1,205

    I believe that you need to create an entry in your web.config file for the SMTP Server you will be using; place this entry below the </system.web> tag and fill out the entries required.  You may or may not need the password and userName fields filled out if you are supplied with a SMTP server from your hosting company.

    <system.net>

    <mailSettings>

    <smtp from="YOUR_FROM_ADDRESS_HERE">

    <network host="SMTP_SERVER_NAME_HERE" password="" userName=""/>

    </smtp>

    </mailSettings>

    </system.net>

    - Will

    Please mark the most helpful reply/replies as "Answer".

    - William
    http://thefrozencoder.ca
  • Re: System.InvalidOperationException: The SMTP host was not specified.

    01-22-2006, 12:47 PM
    • Member
      25 point Member
    • zygote_home
    • Member since 12-20-2005, 11:15 PM
    • Posts 5

    Thanks ..that fixed it..

    David

  • Re: System.InvalidOperationException: The SMTP host was not specified.

    02-12-2009, 9:28 AM
    • Member
      31 point Member
    • VyshuGlossy
    • Member since 02-02-2009, 11:53 AM
    • Posts 28

    Hi friends,

    I have a doubt here..

    whighfield:

    <smtp from="YOUR_FROM_ADDRESS_HERE">

    <network host="SMTP_SERVER_NAME_HERE" password="" userName=""/>

    If i wanna mention "from address" in textbox, how can i mention it here?

    And host address what should i mention here?

    Please clear my doubt..

     

  • Re: System.InvalidOperationException: The SMTP host was not specified.

    05-12-2009, 10:49 AM
    • Member
      52 point Member
    • Jelmer850i
    • Member since 03-17-2005, 3:07 AM
    • Posts 746

    In the passwordrecovery you can add/change this:

    <MailDefinition From="info@test.com" IsBodyHtml="True"
              Subject="Uw toegangsgegevens">
          </MailDefinition>

  • Re: System.InvalidOperationException: The SMTP host was not specified.

    07-21-2009, 12:10 PM
    • Member
      4 point Member
    • RonnieStokie
    • Member since 05-07-2009, 12:07 AM
    • Posts 12

    would my email host; "smtp.orangehome.co.uk" go in the network host=?

    What goes in the smtp form section, example please?

  • Re: System.InvalidOperationException: The SMTP host was not specified.

    07-22-2009, 2:40 AM
    • Member
      52 point Member
    • Jelmer850i
    • Member since 03-17-2005, 3:07 AM
    • Posts 746

    You can put it like this, i use localhost for smtp you need to change that in your smtp:

    <system.net>
        <mailSettings>
          <smtp from=no_reply@test.com>
            <network host="localhost"/>
          </smtp>
        </mailSettings>
      </system.net>

  • Re: System.InvalidOperationException: The SMTP host was not specified.

    10-22-2009, 2:59 PM
    • Member
      10 point Member
    • fxjamy
    • Member since 07-07-2008, 3:50 PM
    • Posts 7

    thanks.

    That works, i don't get that error anymore.

    But the purpose is still not solved. Whenever i try to send mail, its not delivered, and stored in : c:\Inetpub\mailroot\Queue

    I'm running my code on - iis 5.1 on NTFS.

    please help



    -=Shivam=-
Page 1 of 1 (8 items)