Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > .NET Web Services
|
.NET Web Services Discussions about .NET XML Web Service technologies including ASMX files, WSDL and SOAP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Web Services section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 8th, 2003, 12:43 AM
Registered User
 
Join Date: Aug 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to c_bananas
Default SMTP not mailing...help!

Hi

When trying to send email using SmtpMail i get the following error:

System.Web.HttpException: Could not access 'CDO.Message' object. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x80040213): The transport failed to connect to the server.

Where should i start looking?

Thanks!
Jason

 
Old October 8th, 2003, 06:03 AM
Registered User
 
Join Date: Oct 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to saitx Send a message via Yahoo to saitx
Default

just specify the SMTPServer as "localhost"

 
Old October 8th, 2003, 09:26 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

I'm seeing the COMException and wondering if you have looked at using the native .Net mail capabilities: System.Web.Mail

Peter
 
Old October 8th, 2003, 10:14 AM
Authorized User
 
Join Date: Jun 2003
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I had a similar problem - had to add SMTPServer = "localhost"
and go to IIS > SMTP Server > right click Properties > Access tab > Click the Relay button > Add > in the IP address 127.0.0.1 - this is localhost.

the stange thing is I did not have to do this for a while I was sending out mail without any problems then the error started coming up (might have been 1.0 to 1.1 dotNet - can't remember).

planoie - I believe that the native .net mail System.Web.Mail is just a wrapper around existing com objects, hence the InteropServices.COMException errors.
 
Old October 10th, 2003, 06:11 AM
Registered User
 
Join Date: Aug 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to c_bananas
Default

Thanks for all the replies!! much appreciated.

well it turns out that the client who was implementing this got his Smtp Server name wrong. so it was as simple as correcting that. therefore it's as simple as the error message suggests. sigh...

Thanks again
Interesting that they (MS) would just use interop, i guess nothing to really change with SMTP

 
Old November 17th, 2003, 01:28 PM
Registered User
 
Join Date: Nov 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to FROSTY33
Default

jhouse - thanks so much for your posting. I too ran into the exact same scenario where my SMTP mail logic stopped working... My guess is that it was a security update patch from Microsoft that killed it.

Anyway, just to confirm, I had to set the IIS\SMTP settings as you suggested and actually define the SMTPServer and things appear to be working just fine. Well, minus the fact that everything is still getting stuck in the SMTP queue. :-)

Thanks,

Frosty






Similar Threads
Thread Thread Starter Forum Replies Last Post
mailing manish_partey ASP.NET 1.0 and 1.1 Professional 1 April 25th, 2007 08:20 AM
Mailing prashanth_kumarbv Classic ASP Basics 2 October 27th, 2006 08:40 PM
Mailing List Carriemh Beginning PHP 2 September 2nd, 2006 07:17 AM
about mailing using CDONTS anurag_j_r Classic ASP XML 1 March 12th, 2004 04:38 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.