It may very well be my host definition. I will give all information I can.
This is with SmarterMail. It is running on it's own internal web with is at
http://127.0.0.1:9998
First I configured the IIS7 SMTP E-Mail
E-mail address: support@xxxxxx
Deliver e-mail to SMTP server:
http://127.0.0.1:9998
Port: 25
Authetication Settings: Not required (I'm not clear on if this should be the
Smarter Mail admin username and password).
Then I modified the web.config:
<system.net>
<mailSettings>
<smtp from=support@xxxxxx>
<network host="localhost" defaultCredentials="true" />
</smtp>
</mailSettings>
</system.net>
Then I sent the email from within the web application running locally:
An existing connection was forcibly closed by the remote host
Stack Trace:
[SocketException (0x2746): An existing connection was forcibly closed by the
remote host]
System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32
size, SocketFlags socketFlags) +1044443
System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32
size) +119
[IOException: Unable to read data from the transport connection: An existing
connection was forcibly closed by the remote host.]
System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32
size) +267
System.Net.DelegatedStream.Read(Byte[] buffer, Int32 offset, Int32 count)
+41
System.Net.BufferedReadStream.Read(Byte[] buffer, Int32 offset, Int32
count) +96
System.Net.Mail.SmtpReplyReaderFactory.ReadLines(SmtpReplyReader caller,
Boolean oneLine) +280
System.Net.Mail.SmtpReplyReaderFactory.ReadLine(SmtpReplyReader caller)
+26
System.Net.Mail.SmtpReplyReader.ReadLine() +13
System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port)
+802
System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port) +316
System.Net.Mail.SmtpClient.GetConnection() +42
System.Net.Mail.SmtpClient.Send(MailMessage message) +1485
This is what is in the SmarterMail smtpLog:
06:41:36 System.Net.Sockets.SocketException: An address incompatible with
the requested protocol was used
at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot,
SocketAddress socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at TcpServerLib.Pooled.PooledTcpServer.StartListening(IPEndPoint
ipEndPoint)
06:41:36 System.Net.Sockets.SocketException: An address incompatible with
the requested protocol was used
at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot,
SocketAddress socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at TcpServerLib.Pooled.PooledTcpServer.StartListening(IPEndPoint
ipEndPoint)
Does anything stand out here that I need to address to get SMTP up and
running?
"Steve Schofield" <steve@xxxxxx> wrote in message
news:eaLqcYe6HHA.5796@xxxxxx
> The issue is probably related to not defining the proper host in your
> code. You can consult www.systemnetmail.com for examples. This site is a
> great resource IMO.
>
> On a side note about the 2 mail servers.
>
> I found FreeSMTP pretty straight forward to configure. I don't want my
> post to be about reviewing SMTP servers, FreeSMTP runs like a normal
> application instead of a service.
>
> If you want to continue using Smartermail, consult the vendors site at
> www.smartertools.com. I personally use the free version and it works
> well.
> I found it easy to configure, but I deal with email every day. At a
> minimum, you need to enable the delivery and SMTP service(s). These are
> inside the web-based admin tool.
>
> --
>
> Steve Schofield
> Windows Server MVP - IIS
> http://weblogs.asp.net/steveschofield
>
>
> "Nick" <nospam@xxxxxx> wrote in message
> news:5FBB4571-8114-40A3-BE89-EAE1F1B58016@xxxxxx
>>I have the Vista Home Premium operating system and I do software
>>development on it using Visual Studio.Net. I am developing an ASP.Net web
>>application that sends out emails.
>>
>> I need to configure SMTP and I have tried several options from installing
>> SmarterMail and Free Smtp. I was able to actually send an email using
>> SmarterMail but it has failed when using
>> System.Net.Mail.SmtpClient.Send(MailMessage message).
>>
>> Should I continue to try to figure out SmarterMail or is there a better
>> way? If SmarterMail is the way to go, how do I go about configuring this? >