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

  • 0

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="username@domain.com">
<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>



Was this answer helpful?

« Back

chat