Port and host for sending mails through C#

Discussion in 'Windows / IIS' started by GSS355, May 29, 2009.

  1. I have code to send emails to myself. The SmtpClient object requires a port (int) and host (string).

    What values do I need for this?

    Thanks
     
  2. Try 25 for port and localhost for host.
     
  3. What about production? I am assuming that will be different (when the site is live and hosted)?
     
  4. Actually it should still be the same. On our web server we have setup an smtp service for the web server. Its the recommend way of sending out email with your web application.
     

Share This Page