Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4590226
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T22:13:09+00:00 2026-05-21T22:13:09+00:00

I have an asp.net 4.0 site which has an email facility. I tested using

  • 0

I have an asp.net 4.0 site which has an email facility.
I tested using one mail server, then when I put it on the customers server with the code changed to point to the customers smtp server, its as if its still looking for the old smtp server, which aint there.
There is no mention of it in the code any more, am I missing something?

  • changed the code on the development machine, re-built project, sorted! thanks *

thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T22:13:10+00:00Added an answer on May 21, 2026 at 10:13 pm

    You should be defining the SMTP server settings in your Web.config, like this (instead of in code):

    <system.net>
        <mailSettings>
            <smtp from="me@mydomain.com">
            <network host="smtp.mydomain.com"/>
            </smtp>
        </mailSettings>
    </system.net>
    

    You can also specify the credentials here. And then just instantiate a new SmtpClient like this:

    SmtpClient client = new SmtpClient();
    

    It will use the configuration from the Web.config.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ASP.Net site, in which I am using a ListView with a
We have a data driven ASP.NET website which has been written using the standard
Suppose I have a site at www.example.com which has an IFRAME pointing to ASP.NET
I used to have an embedded user control in an ASP.NET web site which
simple question... Given I have an ASP.NET site, which uses a [custom] RoleProvider, Is
I have an ASP.NET MVC web site. I have many actions which require authentication
i have part of Asp.NET 1.1 project. I work with remote site, which works
I have a Site.Master in my ASP.NET project which defines a HEAD section as
i have multilingual asp.net site. there is a masterpage and default.aspx. I put two
I am working with an asp.net 2.0 site (call it site 1) which has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.