473,781 Members | 2,491 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

System.Web.Mail

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)
Nov 20 '05 #1
7 4303
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.Http Exception

SOURCE: System.Web

TARGET SITE: System.Object CallMethod(Syst em.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.Reflecti on.TargetInvoca tionException: 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
Nov 20 '05 #2
I have client machines running my programs that use System.Web.Mail and they
do not have IIS installed.

Make sure your line

SmtpMail.SmtpSe rver =
Configuration.C onfigurationSet tings.AppSettin gs("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
"Brian Henry" <br**********@n ewsgroups.nospa m> wrote in message
news:uR******** ******@TK2MSFTN GP10.phx.gbl...
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)

Nov 20 '05 #3
smtp server is already configured this was working in the past and now it
all the sudden wont.....

"Greg Burns" <greg_burns@DON T_SPAM_ME_hotma il.com> wrote in message
news:OL******** ******@TK2MSFTN GP10.phx.gbl...
I have client machines running my programs that use System.Web.Mail and they do not have IIS installed.

Make sure your line

SmtpMail.SmtpSe rver =
Configuration.C onfigurationSet tings.AppSettin gs("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
"Brian Henry" <br**********@n ewsgroups.nospa m> wrote in message
news:uR******** ******@TK2MSFTN GP10.phx.gbl...
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)


Nov 20 '05 #4
* "Brian Henry" <br**********@n ewsgroups.nospa m> scripsit:
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.systemwebma il.net/>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #5
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.SmtpSe rver Property
http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfSystemWebM ailSmtpMailClas sSmtpServerTopi c.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.

Nov 20 '05 #6
thanks for the info

""Peter Huang"" <v-******@online.m icrosoft.com> wrote in message
news:Pd******** ******@cpmsftng xa10.phx.gbl...
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.SmtpSe rver Property
http://msdn.microsoft.com/library/de...us/cpref/html/ frlrfSystemWebM ailSmtpMailClas sSmtpServerTopi c.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.

Nov 20 '05 #7
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.microso ft.com/cdo/configuration/sendusing").VAL UE
= 2
..Configuration .FIELDS("http://schemas.microso ft.com/cdo/configuration/smtpserver").VA LUE
= "??????"
..Configuration .FIELDS("http://schemas.microso ft.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
Nov 20 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
8675
by: Trond A. S. Andersen | last post by:
Hi, all! I'm trying to use the System.Web.Mail. "package" combinded with System.Web.Mail.SmtpMail in order to send MS Excel spreadsheets attached to mail messages. However, sending one single spreadsheet attachment per message, seems to be causing som kind of corruption of the attachment, while several spreadsheets per works just fine. Consider the following three snippets of C# code:
3
3273
by: Phil Mc | last post by:
Hi has anyone come accross the problem.... with referance to System.Web.Mail.MailMessage and System.Web.Mail.SmtpMail THIS WORKS FINE mail=new MailMessage(); mail.From = "W-MyPcName.mycompany.com"; mail.To=strTo; mail.Cc=strCC; mail.Bcc=strBCC;
5
2237
by: martin | last post by:
Hi, I have created a class that is totally seperate from my web application. However this class is used extensivly by the web application for stuff like data access. I wish to add a function to this class that will send email, however my class will not seem to recognise the system.web.mail.mailmessage. my first impression on this is that I may have to use some sort of third
3
4357
by: pmud | last post by:
Hi, I have ab ASP.Net Application in which I need to send e-mail on button click. Even though my C# code for that is correct.I am getting the following error:: I think the following error can be bcoz of the SMTP virtual server. I cant view the SMTP virtual server in IIS. How to correct this error??? Send failure: System.Web.HttpException: Could not access 'CDO.Message' object. ---> System.Reflection.TargetInvocationException:...
1
8182
by: Eric Sheu | last post by:
Greetings, I have been searching the web like mad for a solution to my SMTP problem. I am using Windows Server 2003 and ASP.NET 2.0 w/ C# to send out e-mails from a web site I have created to the members of my organization. I think my problem is incorrectly setting the settings on my server or an authentication problem. Here is the code I have written to send a test message: -----Code Begins: Sensitive Information Replaced by -----...
2
3501
by: Ryan | last post by:
Hi, I receive an access denied error (see below) when attempting to send an email with BodyFormat=MailFormat.Html from an asp.net page. Exactly the same code works fine in a console application, and also succeeds from the asp.net page with BodyFormat=MailFormat.Text. I've recently upgraded from W2K SP4 to WinXP SP2 and am using .Net Framework v1.1 SP1. The code worked fine under W2K SP4.
1
5908
by: theWizard1 | last post by:
The following sends my email, but the attachment is empty. The attachment should contain the data that is in the string that was created from the xmlReader. I have a stored procedure written using For XML explicit, and it returns an xml reader. Then the following: xmlRdr.MoveToContent(); string myTemp = xmlRdr.ReadOuterXml();
2
17489
by: clevrmnkey | last post by:
I've had nothing but trouble from the System.Net.Mail objects, but I finally need to make them work, and I can't for the life of me see what I'm doing wrong. I pared back my mail transaction to the bare minimum: System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("<my mail server IP>", 25); smtp.Send("<one of my email addresses>", "<another of my email addresses>", "Hello", "World");
10
3965
by: Frank | last post by:
Hi, I am hoping to find out the differences between the System.Net.Mail and System.Web.Mail. Can some nice folks post the differences; or some urls which show the differences? Great Thanks Frank
2
6827
by: satnamsarai | last post by:
Using System.Net.Mail: Sometimes I get error 'failure sending mail. Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.' Not sure how to fix this error. I am able to send messages sometimes both other times randomly following error appear EXCEPTION:
0
9639
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10143
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9939
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6729
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5375
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5507
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4040
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3633
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2870
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.