How can I send email from ASP.Net if SMTP Authentication is required for your Mail Server?

Our SMTP server requires authentication before you can send an email.
But
If your ASP or ASP.Net script is located on our Web Server, you don't need any SMTP Authentication to send an email.

Below is the code examples

<system.net>  
  <mailSettings>
    <smtp deliveryMethod="Network" from="your_email_address">
      <network enableSsl="false" host="your_smtp_host" port="587" userName="your_email_address"  password="your_email_address_password" />
    </smtp>  
  </mailSettings>
</system.net>

You need a fairly clear reference depending on the SMTP email method and the website platform you are using.
  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

I get a database timeout expired error on my ASP.NET application. What can I do?

I get the following error when my ASP.NET application connects to the MS SQL server:...

How do I get my ASP.net application to display non-English language

ASP.net allows the developer to encode the page using character sets other than unicode.  If your...

I get a configuration error when I execute my application in a subdirectory. How do I resolve this?

This error may occur if the application is being run out of a subfolder and the subfolder is not...

Why can I still access my ASP.NET pages even though I disabled anonymous access to my directory?

After disabling anonymous access in the permission manager in the control panel, ASP.net pages...

After I configure the custom error setting in the control panel, I still get the generic error page?

Custom error setting is a web server setting that sets your website Error Pages, but you can...