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

Publish a .NET Core site on Plesk

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

How do I enable detailed error messages in the web.config of my website?

Detailed Errors allows for debugging errors in your websites code. Without detailed errors...

Troubleshooting ASP.NET site

In most cases the error should display on the screen.However if it does not you can enable error...

Validation of viewstate MAC failed

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

How to Enable ASP.NET Debugging in Plesk

here may be times you need to see more logging or debugging information for your ASP.NET...