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

ASP.NET Session Timeout

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

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

Troubleshooting ASP.NET site

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

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