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...

Publish a .NET Core site on Plesk

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

User not local; please try a different path. when trying to send through your form on plesk

User not local; please try a different path. The server response was: Sender address is not valid...

Setting up .NET Core on Unmanaged Windows VPS

At times after publishing .NET Core Web Application to a Windows Server web server it may not...

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...