What SMTP Settings Should I Use in web.config file?

In web.config SMTP settings, you can use your existing email address (whose authentication you want to use), password and appropriate port number. Following is a sample code to show the web.config SMTP settings:


<system.net>
  <mailSettings>
    <smtp deliveryMethod="Network" from="[email protected]">
<network defaultCredentials="false" host="mail.domain.com Or SMTP server IP" port="25 Or 587" userName="full-email-address" password="xxxxxxxxxxxx" />
    </smtp>    
  </mailSettings>  
</system.net>


  • 0 Users Found This Useful

Was this answer helpful?

Related Articles

How to resolve configuration error of 'targetFramework'?

You may face the below error while running on your ASP website which targeting to the application...

How to backup/restore IIS7 configuration file from command prompt?

Backup: Login to your server by using administrative rights. Open command prompt using...

How to Backup/Restore IIS7 Configuration?

IIS 7 automatically makes history snapshots of ApplicationHost.config each time a change is...

How to Fix HTTP Error 500 (or 500.21) - Internal Server Error Handler SSINC-shtml?

Error Message HTTP Error 500 (or 500.21) - Internal Server Error Handler SSINC-shtm' handler...

How to set MIME types for web fonts in IIS?

Font Squirrel's @Font-face generator is one of the best free online tools to generate required...