473,699 Members | 2,768 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 4294
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
8667
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
3265
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
2234
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
4351
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
8177
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
3493
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
5899
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
17478
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
3954
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
6820
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
8615
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9173
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9033
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
8882
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
7748
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6533
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5872
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
4375
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...
3
2009
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.