Knowledgebase

Sending Email via C# and ASP.NET

Add the following to your web.config file:

  <system.net>
    <mailSettings>
      <smtp from="youremailfromaddress@example.com">
        <network host="mail.example.com" password="password" userName="username@example.com" port="25" />
      </smtp>
    </mailSettings>
  </system.net>
  • 1 Users Found This Useful

Was this answer helpful?

Related Articles

Force to HTTPS

In the following example we will redirect HTTP to HTTPs using URL Rewrite:Edit your web.config...

Validation of viewstate MAC failed

To solve this you need to add a machinekey in web.config fileTo generate a machine key please...

ASP.NET Session Timeout

This in-depth analysis helps you know the problem and workaround when you experienced ASP.NET...

Can I use ASP.NET State Service?

ASP.NET state service is not enabled due to the fact on shared hosting it keeps the session alive...

Publish a .NET Core site on Plesk

Below are the recommended steps to upload your website on our Plesk servers for .NET Core...