System.Web.Mail

B

Brian Henry

To use the SMTP mail service from System.Web.Mail do you have to have IIS
installed on the client machien? I wanted my app to email any errors that
may of occured to me on the clients machines in the application but now it
is popping up with CDO errors (even on the machine it was working on
originally)
 
B

Brian Henry

Here is the full error message... it sounds like it cant talk to the server
in a sense but the server is running and i can talk to it through outlook
(its an exchange 2000 server) with no problems... also can send email with
no problems in outlook


TYPE: System.Web.HttpException

SOURCE: System.Web

TARGET SITE: System.Object CallMethod(System.Object, System.String,
System.Object[])

MSDN HELP LINK:

HASH CODE: 90

BASE EXCEPTION: System.Runtime.InteropServices.COMException (0x80040211):
The message could not be sent to the SMTP server. The transport error code
was 0x80040217. The server response was not available


INNER EXCEPTION: System.Reflection.TargetInvocationException: Exception has
been thrown by the target of an invocation. --->
System.Runtime.InteropServices.COMException (0x80040211): The message could
not be sent to the SMTP server. The transport error code was 0x80040217. The
server response was not available
 
G

Greg Burns

I have client machines running my programs that use System.Web.Mail and they
do not have IIS installed.

Make sure your line

SmtpMail.SmtpServer =
Configuration.ConfigurationSettings.AppSettings("SMTPServer")

is pointing at an SMTP server (for me, this is a server on our network with
IIS and SMTP configured) and not pointing to "localhost"

HTH,
Greg
 
B

Brian Henry

smtp server is already configured this was working in the past and now it
all the sudden wont.....
 
H

Herfried K. Wagner [MVP]

* "Brian Henry said:
To use the SMTP mail service from System.Web.Mail do you have to have IIS
installed on the client machien? I wanted my app to email any errors that
may of occured to me on the clients machines in the application but now it
is popping up with CDO errors (even on the machine it was working on
originally)

<URL:http://www.systemwebmail.net/>
 
P

Peter Huang

Hi Brian,

We do not need to installed IIS on the machine when using the
System.Web.Mail to send a mail, if we have specified the SmtpServer on the
network.

SmtpMail.SmtpServer Property
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfSystemWebMailSmtpMailClassSmtpServerTopic.asp

Property Value
The name of the e-mail relay server. If SmtpServer is not set, the name of
the local SMTP server is used.

Remarks
If your local SMTP server (included with Windows 2000 and Windows Server
2003) is behind a firewall that blocks any direct SMTP traffic (through
port 25), you will need to find out if there is a smart host available on
your network that is allowed to relay SMTP messages to the Internet.

A smart host is an SMTP server with the permissions to relay outgoing
e-mail messages directly to the Internet from internal SMTP servers. A
smart host should be able to simultaneously connect to both the internal
network and the Internet in order to work as the e-mail gateway.

For information about configuring your local SMTP server, see the articles
"Manage Your Company's E-mail with the Windows 2000 SMTP Service" and
"Using SMTP for Outgoing Messages" in the MSDN library at
http://msdn.microsoft.com.


In addition to Herfried's suggestion, I think you may try to send the mail
using OE(outlook express) via the smtp server you specified in your
application to see if this works for you, so that we can isolate the
problem.

You may have a try and let me know the result.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
D

Dave

Peter,

I've been searching, on and off, for several weeks looking for
information related to the subject of this email thread. It wasn't
until you responded and included the code 0X80040127 in the text of
your response, that I finally got a hit that looked related to my
question.

I am using Outlook automation using CDO within Visual Foxpro, and
instead of an SMTP server, I make reference to our company's mail
server. Here's part of the code:

..Subject = "This is the subject line"
..TextBody = "This is the body of the message"
..Configuration.FIELDS("http://schemas.microsoft.com/cdo/configuration/sendusing").VALUE
= 2
..Configuration.FIELDS("http://schemas.microsoft.com/cdo/configuration/smtpserver").VALUE
= "??????"
..Configuration.FIELDS("http://schemas.microsoft.com/cdo/configuration/smtpserverport").VALUE
= 25


-- Where ????? is the name of our Microsoft Exchange Server.

This has worked fine until I ran into someone who has Yahoo DSL, and
it fails with this message:

"OLE Dispatch Exception Code 0 from ? The message could not be sent
to the SMTP server. The Transport error code was 0X80040217. The
server response was not available."

Any ideas out there? Thanks,

Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top