views:

545

answers:

4

I am trying to do a simple app that will send email. The constructor for SmtpClient asks for smtp Server Name. How do i know what's the name of my machine's smtp server (do I have one ?). I have IIS installed.

+1  A: 

Typically it's localhost, however if you are using Outlook, you sometimes can find it in there.

Jack Marchetti
+2  A: 

You can use any smtp server you want' either your own hosted or a comercial one that allows you access. just put in the address (127.0.0.1 for your own)

Dani
+1  A: 

go to Control Panel \ Administrative Tools \ Internet Information Services (IIS) Manager

the view depends on IIS version, but you will definitely see word SMTP. right click on that item and start it. pass "127.0.0.1" to constructor.

Andrey
+3  A: 

It will be the name of your machine. You don't have to use the IP address.

Ardman