all groups > iis smtp nntp > august 2007 >
You're in the

iis smtp nntp

group:

SMTP on Vista Home Premium


SMTP on Vista Home Premium Nick
8/28/2007 7:00:03 PM
iis smtp nntp:
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?
Re: SMTP on Vista Home Premium Nick
8/28/2007 7:51:54 PM
It is the very fact that I am on the Vista operating system that I am having
this issue. You see SMTP is installed on other operating systems and is not
in Vista. Please allow others that have something to contribute to respond.
Thank You.

[quoted text, click to view]
Re: SMTP on Vista Home Premium Mr. Arnold
8/28/2007 9:20:41 PM

[quoted text, click to view]

Although you are running Vista, where you should really be posting to about
the issue is a dotnet NG like MS.Public.dotnet.framework.aspnet or
MS.Public.dotnet.framework.general.



[quoted text, click to view]
Re: SMTP on Vista Home Premium Sanford Whiteman
8/28/2007 10:12:10 PM
[quoted text, click to view]

By which I suppose you mean "using the web interface or a mail
client."

[quoted text, click to view]

Failed with what error? Surely you can consult the docs to see what
error was returned by the SMTP server and/or the SMTP client
component.

[quoted text, click to view]

If you want to develop code that is portable to a full-fledged SMTP
server, then you should code against SmarterMail or something similar.
This is not the place to outright recommend SmarterMail, however.

[quoted text, click to view]

You have to consult your mailserver logs and your mail component docs,
then tell us what error(s) you are actually seeing. For example, are
you allowed to relay without authentication, etc..

--Sandy
Re: SMTP on Vista Home Premium Steve Schofield
8/28/2007 10:41:31 PM
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


[quoted text, click to view]
Re: SMTP on Vista Home Premium Nick
8/29/2007 7:33:22 AM
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@mydomain.com
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@mydomain.com>

<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?

[quoted text, click to view]
Re: SMTP on Vista Home Premium Nick
8/29/2007 11:30:40 AM
Sandy,

Thank you for your response. I modified the IIS7 SMTP E-Mail to have the
SMTP Server set to 127.0.0.1. I have only one user in SmarterMail and that
is "admin". The credential setup in IIS7 SMTP E-mail is that of "admin".

In the mail settings of web.config, I use
network host="localhost" userName="admin" password="mypassword"

There is also a port settings. I have left port off completely, set it to
9998, and also tried 25. In the event viewer I always see:

Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 8/29/2007 11:17:25 AM
Event time (UTC): 8/29/2007 6:17:25 PM
Event ID: 66c7688f90314ec5b9decef309ad99b3
Event sequence: 15
Event occurrence: 1
Event detail code: 0

Application information:
Application domain: 2e5dc7fc-12-128328849928554765
Trust level: Full
Application Virtual Path: /Commerce.Web
Application Path: D:\Projects\CSK_2.0.1\CSK 2.0.1\Commerce.Web\
Machine name: NICK-PC

Process information:
Process ID: 4516
Process name: WebDev.WebServer.EXE
Account name: Nick-PC\Nick

Exception information:
Exception type: SmtpException
Exception message: Failure sending mail.

Request information:
Request URL: http://localhost:65365/Commerce.Web/PasswordRecover.aspx
Request path: /Commerce.Web/PasswordRecover.aspx
User host address: 127.0.0.1
User:
Is authenticated: False
Authentication Type:
Thread account name: Nick-PC\Nick

As you can see Is authenticated = False and I don't know why.

[quoted text, click to view]
Re: SMTP on Vista Home Premium Sanford Whiteman
8/29/2007 1:04:37 PM
[quoted text, click to view]

That's the web server, not the SMTP server.

[quoted text, click to view]

Should be just '127.0.0.1'. SMTP servers don't use the HTTP protocol.

[quoted text, click to view]

If you have username (not the admin username, but preferably a
standard SmarterMail username), use it and its password. AUTH may not
be required by SM depending on your setup, but it will always be
accepted.

Re: SMTP on Vista Home Premium Sanford Whiteman
9/2/2007 1:36:25 PM
[quoted text, click to view]

How do you know that you are passing the credentials in a valid format
(i.e. it doesn't need host@domain?). Have you tested using a full mail
client?

[quoted text, click to view]

MTAs listen on port 25. You must stop getting distracted by the
proprietary web UI.


[quoted text, click to view]

What do your SmarterMail logs say for this connection? You have to be
ready to deal with the whole picture. People spend years knowing how
to troubleshoot mail problems; you can't take the easy way out and not
even *look* at both client and server.

[quoted text, click to view]

B/c you did not authenticate to the web page. I believe this is an
HTTP log entry.

Re: SMTP on Vista Home Premium Sanford Whiteman
9/2/2007 2:19:28 PM
[quoted text, click to view]
AddThis Social Bookmark Button