Sponsored by
www.aspnetemail.com
|
 |
Discuss This FAQ Item
Got a question? Another Suggestion? Want to post your solution? Discuss it below.
-
Different Exception
[ Reply ]
Hi. I also get the 'scary' message, but the InnerException that I get is totally different. First I have the System.Web.HttpException, whose InnerException is System.Reflection.TargetInvocationException, whose InnerException is System.Runtime.InteropServices.COMException, which doesn't have an InnerException, but it has an HResult property set to -2147219963, that is an MAPI_E_NOT_INITIALIZED error thrown by the CDO.Message.1 object. Any ideas about how to work around this? I was a little confused since I wouldn't expect CDOSYS.dll to rely on MAPI. Thanks in advance and congratulations for your great site.
Rolando Matarrita Sequeira [ rmatarrita ( at ) hotmail dot com ],
2004-02-03 14:42:19
#
-
RE: Different Exception
[ Reply ]
on thing I did find out (and will post as an additional faq item)
Is that if you install Exchange, or anything related to Exchange, the CDOEX.DLL will replace CDOSYS. Which blows up System.Web.Mail. You may want to check to see if this is thhe problem (if you have cdoex.dll installed). If so, you may need to get another copy of the CDOSYS.dll and install it.
Here is translated article discussing this problem.
http://babelfish.altavista.com/babelfish/urltrurl?lp=zh_en&url=http%3A%2F%2Fwww.microsoft.com%2FChina%2FCommunity%2Fprogram%2Foriginalarticles%2FTechDoc%2Fsendmail.mspx
Cheers! Dave
Dave [ dave ( at ) 123aspx dot com ],
2004-02-03 15:34:19
#
-
RE: Different Exception
[ Reply ]
the problem may come if the To and From address are null or not valid. so plz trace all expections
Rupesh [ rkgupta12 ( at ) yahoo dot com ],
2005-08-29 23:06:14
#
-
RE: Different Exception
[ Reply ]
Here's a different solution that helped us.
Go to the SMTP server properties and select the Delivery tab, then click the Advanced button. Enter your relay server name in the Smart Host field.
Also, you might try adding the account under the Security tab under which the CDO.Message object is being used.
BTW, I am setting the SMTPServer property, but that alone (without either of the above actions) does not work.
We run Win 2003 SP1.
HTH
Mike [ jzserai ( at ) state dot pa dot us ],
2005-11-17 08:01:45
#
-
Could not access 'CDO.Message' object
[ Reply ]
Hi, Love your site. I've been hunting high and low for an answer to this. There seems to be many questions on this and very fews answers elsewhere.
Anyway I fixed my problem my looking at the InnerException message. This had a message ' 451 See http://pobox.com/~djb/docs/smtplf.html' This site told me that there was a 'bare LF' without a 'CR', ie. a line-feed without a carriage return. In the message I was sending '\n' without a '\r', so adding a '\r' fixed the error. By the way, I ended up using an html break '<br>' which worked better for me.
Regards, Bryan Stanton
Bryan Stanton [ stantonb ( at ) ihug dot com dot au ],
2004-02-05 15:36:08
#
-
RE: Could not access 'CDO.Message' object
[ Reply ]
Thanks for the kind words.
BTW, here is another gotcha. A lot of people use Environment.NewLine to concat email message lines. DO NOT DO THAT. The Environment.NewLine will output different line terminating chars out, depending upon what system you use. The SMTP spec ONLY allows \r\n (vbCrLf) as line terminating chars.
Besure to code accordingly.
Cheers! Dave
dave [ dave ( at ) 123aspx dot com ],
2004-02-05 15:49:03
#
-
RE RE: Could not access 'CDO.Message' object
[ Reply ]
I am sending nearly 60,000 mails. I ma getting this message after 10 ,000 mails.Could you please help me how to overcome this issue.
Raghav [ pvraghav1976 ( at ) gmail dot com ],
2008-02-23 01:53:41
#
-
RE: Could not access 'CDO.Message' object
[ Reply ]
This one worked for me in VB.NET, found this from a search in google...
turns out you need to set the Relay options in IIS in you default SMTP mail server. I didnt even restart SMTP server and it worked. If it doesnt work for you restart it anyway.
***************************
Open up IIS Admin MMC, find the SMTP Virtual Server, right-click, then select Properties. On the Access tab, click the Relay button. In the Relay Restrictions dialog, grant your IP address (127.0.0.1) to the Computers listbox. You may need to restart the SMTP Service. Also make sure Anonymous access is allowd. This may help...
webgamer [ webgamer ( at ) hotmail dot com ],
2004-09-02 02:07:59
#
-
RE: Could not access 'CDO.Message' object
[ Reply ]
I had the same erro when I was trying to access SMTP server across the network. The problem turned out to be the virus scan program bloacking port 25.
Lizard Man [ lm_one ( at ) hotmail dot com ],
2005-05-20 10:41:24
#
-
RE RE: Could not access 'CDO.Message' object
[ Reply ]
You are the bum man. I found out the mcafee anti-virus I have on my system blocked my sending mails using System.Web.Mail. Thanks for the post.
Lateef [ f3mlat ( at ) yahoo dot com ],
2006-05-31 08:54:21
#
-
RE: Could not access 'CDO.Message' object
[ Reply ]
i m using CDO mail at local host. It is working fine.
But when i uploaded my site on server then it is not sending any mail.
Why ??
Reply soon
<a href="http://www.kkcindia.com"><b>Fun, Humor and Jokes : kkcindia.com</b></a>Get all the Enjoyment and Entertainment with Jokes, quotes,SMS Jokes,Free Games and More!
ka. [ kam ( at ) yahoo dot com ],
2005-06-15 02:13:02
#
-
RE RE: Could not access 'CDO.Message' object
[ Reply ]
dqewwer
asasas [ vivek_cal26 ( at ) yahoo dot com ],
2005-09-06 03:04:49
#
-
RE RE: Could not access 'CDO.Message' object
[ Reply ]
Hi,
I've got the same problem as you. The thing is it's working at other server. Just this particular one (omnis.com). Did you figure out your problem? I'm guessing they block port 25.
Anyway, please let me know if you solved the problem. I'm still waiting for Omnis customer support to reply.
Cheers
Andry
Andry Poernomo [ suencien ( at ) hotmail dot com ],
2005-09-22 22:30:25
#
-
RE: Could not access 'CDO.Message' object
[ Reply ]
Try Out the Mail.SmtpMail.SmtpServer = "" Best of Luck
Chirag [ mr dot patelchirag ( at ) gmail dot com ],
2005-08-08 23:08:20
#
-
RE: Could not access 'CDO.Message' object
[ Reply ]
HOW TO FIND OUT THE SMTP SERVER NAME
thiru [ thirusoft123 ( at ) YAHOOMAIL dot CO dot IN ],
2006-02-09 23:14:52
#
-
RE: Could not access 'CDO.Message' object
[ Reply ]
The smtp server seems to block vblf, change to vbcrlf.
Racialist [ rohitsharma dot aus ( at ) gmail dot com ],
2006-06-15 20:35:02
#
-
RE: Could not access 'CDO.Message' object
[ Reply ]
The first thing everyone should do is check the MailMessage has values for the To, From and all other required fields. Otherwise you'll get this error too.
Ash [ ash ( at ) ash dot com ],
2007-06-29 10:25:36
#
-
RE: Could not access 'CDO.Message' object
[ Reply ]
When one mail send and immediately onether mail is send this mail is put in queue folder . otherwise this will give "Could not access 'CDO.Message' object " Error . so if you can not set your smtpserver or you can use remore smtpserver this will not find Queue folder in C:\Inetpub\mailroot\Queue . When your code is upload on server or you can use local Smtp server then this problem will solve
Mohit Chavda [ mohit_chavda2006 ( at ) yahoo dot com ],
2007-08-16 03:23:33
#
-
RE: Could not access 'CDO.Message' object
[ Reply ]
Hi Friends,
I made the following observation, 1. SendMail() works if u don't add any attachment. 2. It throws an error if we try to send a file which is currently accessed/opened usinf textwriter or file.open(). So either dispose the textwriter or set textwriter to null before invoking Sendmail(). 3. This can be proved by attaching some other file which is not being used by your program and sendmail will work.
Ranjit [ yseriesr ( at ) yahoo dot com ],
2008-02-27 01:02:40
#
-
RE: Could not access 'CDO.Message' object
[ Reply ]
One important observation: A mail with attachment won't be sent if u give a relative path for the file u want to send as attachment. Reason: Program under execution can interpret relative path as it will be w.r.t current directory. But mail cannot interpret a relative path.
Ranjit [ yseriesr ( at ) yahoo dot com ],
2008-03-06 02:32:50
#
-
RE: Could not access 'CDO.Message' object
[ Reply ]
Thanks a lot....
Nit [ nithya dot snair ( at ) gmail dot com ],
2010-02-24 23:19:21
#
-
Could not access 'CDO.Message' object - Unspecified Error
[ Reply ]
Hi Dave
Thank you heaps for the website, it is a true dedication to the class..
I have a intranet aspx page that needs to send via an Exchange server an email WITH attachments.
The problem is this, the application will send attachments of any size if I terminal service onto the box and run it from internet explorer there. When I try to send attachments from ANY other machine on the intranet, if the attachment is more than 100kb in size it will throw the error below.
I know it is not exchange as I can send the email with the same attachment from the server via terminal services. I know it is not permissions as I can still send smaller attachments (under 100kb) with the same name and type from ANY other machine on the network.
The error message as you can see does not give much away as to what the problem is. I was hoping you had some experience with this at some point and may be able to point me in the right direction.
Here is the ERROR:
Error Message: Could not access 'CDO.Message' object.
Error Source: System.Web
Inner Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x80004005): Unspecified error --- End of inner exception stack trace --- at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters) at System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters) at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args)
HERE is the code I am using:
private void SendMail(XmlDocument inXML) { //attempt the transform string htmlMsg = String.Empty;
XslTransform xslt = new XslTransform(); xslt.Load(@"\Inetpub\wwwroot\TEST\XSL\TESTEmail.xslt"); StringWriter sw = new StringWriter(); xslt.Transform(inXML, null, sw); htmlMsg = sw.ToString(); sw.Close();
MailMessage msg = new MailMessage(); msg.BodyFormat = MailFormat.Html; msg.To = ConfigurationSettings.AppSettings["EmailTo"]; msg.From = ConfigurationSettings.AppSettings["EmailFrom"]; msg.Subject = "TEST"; msg.Body = htmlMsg; foreach (ListItem li in lbAttachments.Items) { MailAttachment newAtt = new MailAttachment(li.Value, System.Web.Mail.MailEncoding.Base64); msg.Attachments.Add(newAtt); }
SmtpMail.SmtpServer = ConfigurationSettings.AppSettings["SMTPServer"];
SmtpMail.Send( msg );
foreach (ListItem lii in lbAttachments.Items) { try { File.Delete(lii.Value); } catch {} } }
Many thanks for any help you can give..
Ryan.
Ryan [ rowslw ( at ) hotmail dot com ],
2004-04-19 22:30:49
#
-
RE: Could not access 'CDO.Message' object - Unspecified Error
[ Reply ]
so what happens when you iterate through all of the inner exceptions? Do you get any more information?
Cheers! Dave
dave wanta [ dave ( at ) 123aspx dot com ],
2004-04-20 05:37:53
#
-
RE RE: Could not access 'CDO.Message' object - Unspecified Error
[ Reply ]
Thanks for your reply Dave..
Unfortunately there is no more information, i iterated through all the inner exceptions and got the following two only (See Below).
This really has me stumped..
Ryan
Inner Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x80004005): Unspecified error --- End of inner exception stack trace --- at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters) at System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters) at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args)
Inner Exception: System.Runtime.InteropServices.COMException (0x80004005): Unspecified error
Ryan. [ rowslw ( at ) homtail dot com ],
2004-04-21 19:35:19
#
-
RE: RE RE: Could not access 'CDO.Message' object - Unspecified Error
[ Reply ]
Something interesting I found.. I downloaded OpenSMTP from the web and gave that a try. First off it looked like it was going to work but when I published it the the offending server it failed.
The point at which it failed was when OpenSMTP attempts to convert the attachment to base64, within the code it uses the method System.IO.Path.GetTempFileName which is of course supposed to return a temporary file name.
This did not happen.. it seems that etiher the security settings or the framework on our servers is not allowing this method to return a temporary file name.
This of course poses the question.. is this method used in the Sysyem.Web.Mail wrapper ? If so this would answer my question on my problem.
Ryan Orsmond [ rowslw ( at ) hotmail dot com ],
2004-04-23 17:09:01
#
-
RE RE: Could not access 'CDO.Message' object - Unspecified Error
[ Reply ]
I have been working on the same error. Here is what I found to cause my error: The domain name had a numeric character in it, ie. xxxx@4xxxxxxx.com I am working on a fix. HTH, Roy
Roy [ rforkner ( at ) monitronics dot com ],
2004-04-29 08:02:53
#
-
451 failed to open files for write
[ Reply ]
Does anybody know this one: ? The following InnerException reported: System.Runtime.InteropServices.COMException (0x8004020E): The server rejected the sender address. The server response was: 451 failed to open files for write
Note the aspnet account has full read/write access to mailroot and subdirs.
JV [ nospam ( at ) heaven dot org ],
2004-04-29 14:12:22
#
-
RE: 451 failed to open files for write
[ Reply ]
i think it also needs write access to winnt\temp and access to the IIS Metabase (can't remember exactly, but I know I documented it on this site, somewhere<g> )
dave wanta [ dave ( at ) 123aspx dot com ],
2004-04-29 14:29:49
#
-
RE RE: 451 failed to open files for write
[ Reply ]
buddy, you need a search engine!
Anyway, I found the solution which I am posting here for the next poor soul that runs into the same problem:
Instead of mailObj.smtpserver = "server name"
use:
mailObj.smtpserver.insert(0,"server name")
This makes absolutely no sense, but it works!!
Bests of luck and thanks for your very usefull site.
JV [ nospam ( at ) heaven dot org ],
2004-04-29 15:52:27
#
-
Believe it or not but suggestion 6 worked for me...
[ Reply ]
Have had horrible time trying to send emails from within a windows service. The inner exception kept saying "System.IO.FileNotFoundException: The specified module could not be found."
Tried heaps of variations and eventually tried it without specifying the smtpserver - it worked! then tried with various different smtpservers - failed!
Remembered the suggestion 6 here and tried it - and it worked!
weird
thanks for a good site
Gerard [ gerardl ( at ) networkpro dot co dot nz ],
2004-05-16 22:22:38
#
-
This solved it for me!
[ Reply ]
Hi,
Thanks for the tips, I wrestled with this problem for months now.
I got a newer version (6.5.6944.0) of CDOEX.DLL from http://www.dynamiclink.nl/frames/dll.htm
This didn't work at first but a closer examination of the inner exception learned that i was using relative paths to create attachments while absolute paths are required.
Works great now!!
Geert-Jan [ g dot thomas ( at ) topskills dot nl ],
2004-06-16 05:43:06
#
-
bare newlines/illegal characters
[ Reply ]
We ran into the cryptic CDO.Message errors because of unnoticed bare newlines that had gotten into the db record data used to construct html emails. What was more aggravating was that the CDO.Message errors were misleading, we thought the issue was a mailserver setting triggering the smtp relay rejections.
Hope this saves your mail server admins some of the headache we gave ours.
Scott [ sfultz ( at ) communityseason dot com ],
2004-06-16 18:18:04
#
-
RE: bare newlines/illegal characters
[ Reply ]
Having the character '\0' in the HTML body caused the could not access 'CDO.Message' in my case. I filtered that character out and the HTML email sent fine.
I hope this helps someone.
Rob [ rtdwyer ( at ) ilstu dot edu ],
2007-08-28 13:39:21
#
-
Re: Suggestion 6
[ Reply ]
This is actually true! I tried all five suggestions and they didn't help and only sixth worked well
Vlad [ vlad ( at ) datlin dot com ],
2004-06-25 06:41:35
#
-
RE Re: Suggestion 6
[ Reply ]
Yes - this one worked for me too, despite the chap in the following thread stating that it has no effect at all. Oh well.
Danny Allen [ danny dot allen ( at ) theedmgroup dot co dot uk ],
2008-08-05 03:35:01
#
-
Suggestion 6
[ Reply ]
Suggestion 6 will not actualy set the value for SmtpServer. This has to do with strings in .net being immutable (cannot be changed after being created). What this means is that when making a call to string.Insert the underlying string that Insert is called on is not changed. The following example will demonstrate this.
Console.WriteLine( "SmtpMail.SmtpServer == '{0}'", SmtpMail.SmtpServer ); SmtpMail.SmtpServer.Insert( 0, "localhost" ); Console.WriteLine( "SmtpMail.SmtpServer == '{0}'", SmtpMail.SmtpServer ); SmtpMail.SmtpServer = "localhost"; Console.WriteLine( "SmtpMail.SmtpServer == '{0}'", SmtpMail.SmtpServer ); SmtpMail.SmtpServer.Insert( 0, "XXXXXXX" ); Console.WriteLine( "SmtpMail.SmtpServer == '{0}'", SmtpMail.SmtpServer );
output: SmtpMail.SmtpServer == '' SmtpMail.SmtpServer == '' SmtpMail.SmtpServer == 'localhost' SmtpMail.SmtpServer == 'localhost'
So, using the method in Suggestion 6 is no different than not setting the SmtpServer property (or setting it to null or string.Empty). Using Lutz Roeders Reflector (http://www.aisto.com/roeder/dotnet/) I was able to see that the following fields are being set on the COM CDO.Message class if the SmptMail.SmtpServer contains a value. (name of field , value assigned)
"http://schemas.microsoft.com/cdo/configuration/sendusing", 2 "http://schemas.microsoft.com/cdo/configuration/smtpserver", [SmtpMail.SmtpServer] "http://schemas.microsoft.com/cdo/configuration/smtpserverport", 25
Joe Sadowski [ joe ( at ) joesadowski dot com ],
2004-07-06 13:22:08
#
-
Mail sending problem fixed.
[ Reply ]
Thanks for the help! Suggestion 6 did the trick.
Misha [ foo ( at ) bar dot com ],
2004-07-15 14:56:46
#
-
RE: Mail sending problem fixed.
[ Reply ]
Even if you believe that the property wont get set it worked fine for me!
Christoph Sinabell [ christoph dot sinabell ( at ) atosorigin dot com ],
2004-07-22 00:22:00
#
-
Could not access 'CDO.Message' object
[ Reply ]
Becareful in using SmtpMail.SmtpServer.Insert( 0, "127.0.0.1 or your mail server name here")
Although the exception is not thrown it does not mean that your email will actually be sent. I tried this method and it is true that the CDO.Message did not get thrown but the email attempt to send outside the company domain did not occur either.
Tom [ norra ( at ) worldnet dot att dot net ],
2004-08-02 08:50:19
#
-
RE: Could not access 'CDO.Message' object
[ Reply ]
I also found this problem...but anyone know the reason?
fi [ ccscelia ( at ) sinagirl dot com ],
2004-08-23 18:43:18
#
-
RE RE: Could not access 'CDO.Message' object
[ Reply ]
I also was getting couldnt access cdo.message error, used #6, and now i am not getting any exceptions, but the email is not getting sent
Steve [ snovoselac ( at ) stcoudwirelessholdings dot com ],
2004-09-07 11:48:26
#
-
RE RE: Could not access 'CDO.Message' object
[ Reply ]
Hi, Here is solution is provided with a code snippet.
smtpmail.smtpserver=<Server Name>
istead use this snippet smtpmail.smtpserver.insert(0,<Here comes server name>) Reason:- It creates instance of smtp server and insert it into smtpmail class and directly create access of SmtpServer instance. this way Access problem is eradicated. Best of luck Zahid Nawaz Ch.
Zahid Nawaz [ znawaz ( at ) acrologix dot com ],
2004-09-29 05:44:34
#
-
THE SOLUTION..
[ Reply ]
Hi! First, i´m from spain so my english y very poor.. excuseme. I found this solution: If you have installed OUTLOOK EXPRESS (i don´t know if in outlook 200x is the same) be sure that in "email count property", in "server" tab, the option "my server requiered autentication" is DISABLED This solve mi problem, i´m working in a big Lan and in same PCs can´t send emails from the app, just the Pcs who´s has this option enabled... Good Luck!! Salu2!!
Ticoadf [ tico_miguel ( at ) hotmail dot com ],
2004-09-10 05:24:44
#
-
RE: THE SOLUTION..
[ Reply ]
Wow, thanks so much! This is what did it for me. I wonder if you can use the authentication set methods described elsewhere in this site to get around having to disable authentication...
Josh [ jwyckoff ( at ) optosystem dot com ],
2005-07-29 16:14:51
#
-
RE: THE SOLUTION..
[ Reply ]
this fixed it for me too. It was trying to use my outlook express default profile to send out.
nathan [ turboneat ( at ) gmail dot com ],
2005-10-17 08:14:33
#
-
RE: THE SOLUTION..
[ Reply ]
This works for me too, but on the other hand, I think Microsoft sucks, why its COM library requires such unreasonable setting??
wkk [ wkk801 ( at ) gmail dot com ],
2005-11-29 18:12:15
#
-
RE: THE SOLUTION..
[ Reply ]
Incredibly it worked with me. it's the second time i find this error, the second one was solved with the 6th option.
Disier [ disier ( at ) gmail dot com ],
2007-04-10 09:19:02
#
-
Could not access 'CDO.Message'
[ Reply ]
i don't have local smtp server.if i run my exe directly on smtp server then its running properly.but if i run the same exe from my local machine then its give the error "Could not access 'CDO.Message'" .i want to know what is the problem.what sholud i do?
regards sanghamitra
sanghamitra [ mitra_panda ( at ) rediffmail dot com ],
2004-09-23 01:26:26
#
-
#5 worked for me. nt
[ Reply ]
n/t
dave g [ dgrant ( at ) brierley dot com ],
2004-09-27 15:41:20
#
-
Could not access 'CDO.Message' object
[ Reply ]
Getting rid of this line msg.BodyFormat = MailFormat.Html; solved it for me.
kisavorobyaninov [ kisavorobyaninov ( at ) hotmail dot com ],
2004-10-01 14:30:38
#
-
Windows Service
[ Reply ]
I was getting the same exception but only under a Windows Service application that I have. In that case I had to make the code that sends the email execute on a secondary (new) thread, otherwise it would crash. Interestingly enough it won't crash every single time but I just couldn't live with that. The solution was to create a helper class with properties for the email message (to, from, body, attachments, etc) with a Send() method and pass the send method as the new Thread start point.
EmailSender email = new EmailSender("joedoe@someserver.com", "myservice@myserver.com", "Look at This", "yada yada yada ..... "); Thread secondaryThread = new Thread(new ThreadStart(email.Send)); secondaryThread.Start();
Sergio Pereira [ tjoker dot removeThis ( at ) bol dot com dot br ],
2004-10-04 06:21:51
#
-
RE: Windows Service
[ Reply ]
I have same scenarion. The mail works fine (10 minutes interval). Suddenly it stops sending the mails with this exception logged in the 'event viewer',
Can you explain your 'fix' (sample code - if possible) please..
Thanks in advance!
SaravanaKumarPaulraj [ tc00455 ( at ) emirates dot com ],
2006-05-08 03:08:32
#
-
Library Not Registered
[ Reply ]
Hi...I have had a look through your suggestions but I am still confused.
I am using system.web.mail to send messages and it has been working fine. The smtpserver was set to my service provider (the same as my outlook setting). All of a sudden, I am getting an InnerException of "Library Not Registered".
Outlook is still sending messages without a problem.
If I am using my ISP SMTP setting, am I correct in assuming that I am not using the SMTP server in IIS on my machine and that any changes made here would have not effect on the problem?
There are 2 things that have changed since my app was last working: 1. Installation of Windows Automatic Updates (Sevice pack 2 Win XP) and 2. Changing from static ip on a WLAN to dynamic. WLAN is connected to a DSL Router. Would any of these be responsible for the problem? My internet connectivity is fine as is the sending and receiving of mail via outlook.
Please help!
Thanks... Jean
Jean [ genie ( at ) saol dot com ],
2004-10-18 01:07:58
#
-
RE: Library Not Registered
[ Reply ]
I had that problem before. Fixed it by running regsrvr32 /u on C:\Program Files\Common Files\Microsoft Shared\CDO\CDOEX.DLL then regsrvr32 on C:\WINNT\system32\cdosys.dll.
paul [ paulfrancis71 ( at ) sbcglobal dot net ],
2005-01-13 14:27:46
#
-
RE RE: Library Not Registered
[ Reply ]
Hello,
We do not have the CDOEX.DLL on our server where I am getting the message about the library not being regsitered. In the registry, CDOSYS.DLL is regsitered for CDO.MESSAGE.
At one time the send email was working on this server.
Any suggestions?
Thank you
K Bickel [ kbickel ( at ) torchmarkcorp dot com ],
2005-05-17 12:24:40
#
-
Error
[ Reply ]
Server: Windows 2000 .Net Framework: v1.1.4322.573
I have this error message occurring on my production server. The production server is also my email server running exchange. I have tried your suggestions above and it still doesn't seem to work. When running on my development server it works fine. I have created a class in asp.net that sends out an email message. It used to work on the production server but now it doesn't? I never made any changes to the application. So, I tried using the application from my machine (development server) and it works fine. I setup both to use the exact same SMTPServer as "mail.whatever.com" and still the developer server works but the production server does not. I tried with the ip address and still no success on the live server. Any ideas? Maybe a service that I should check to see if it is running? The SMTP service is running. Thank you in advance for your help. Is it possible that maybe the CDO dll file is corrupt? If so, how do I replace it?
------------------------------------ ERROR MESSAGE: ------------------------------------ The following exception occurred: 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 (0x80040211): The message could not be sent to the SMTP server. The transport error code was 0x800ccc15. The server response was not available --- End of inner exception stack trace --- at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters) at System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters) at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args) --- End of inner exception stack trace --- at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args) at System.Web.Mail.CdoSysHelper.Send(MailMessage message) at System.Web.Mail.SmtpMail.Send(MailMessage message) at forms._0.Page_Load(Object sender, EventArgs e) -------------------------------- The following InnerException reported: 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 0x800ccc15. The server response was not available --- End of inner exception stack trace --- at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters) at System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters) at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args) -------------------------------- The following InnerException reported: System.Runtime.InteropServices.COMException (0x80040211): The message could not be sent to the SMTP server. The transport error code was 0x800ccc15. The server response was not available
Black Myst [ black_myst ( at ) hotmail dot com ],
2004-11-05 07:19:14
#
-
RE: Error
[ Reply ]
Hi, Your production server cannot connect to the mail server. Something is blocking it. Has a firewall, virus scanner, or something else, been installed that could interupt the network connection?
Cheers! Dave
dave wanta [ dave ( at ) 123aspx dot com ],
2004-11-05 08:20:54
#
-
RE: Error
[ Reply ]
It turned out that a newer version of McAfee Anti-Virus had been installed on the Server, and it blocked port 25 by default. Once we disabled the port blocking, it all started working again.
Black Myst [ black_myst ( at ) hotmail dot com ],
2004-11-05 09:38:26
#
-
Mail issue ..transport lost its connection
[ Reply ]
I am using standard .net code to send emails within a loop.
for .... mail = new MailMessage() mail.from = fromadd mail.Body = body mail.Subject =subject SmtpMail.SmtpServer = "mysmtpserver" SmtpMail.send(mail) mail = nothing next....
Even for just couple of Yahoo addresses I get success on one address and then failure for others
Error: The transport lost its connection to the server.
Point to note is that randomly some emails go through while the rest fail.
Can anyone explain?
Rahul [ rpandhe ( at ) hotmail dot com ],
2004-11-15 10:56:51
#
-
SMTP Send in For...next
[ Reply ]
Hi !
I want to send e-mails to many addresses with different attachments from an ASP.NET application. I use a For..Next cycle to do it. The first e-mail successfully goes out but the others fail with this "Could not access 'CDO.Message' object." error message.
I'm sure the attachment files are exitst and other applications don't lock them. Every mail contains different file as attachment so they cannot lock the attachments of each other.
If I refresh the sender page the very first message goes out again succesfully.
I create a new MailMessage and a new MailAttachment object in each sequence of the For...Next
The only thing that not change is the SmtpMail object. I feel the source of the error from here. Can I initialize it somehow before sending the mails ? Or do you have any other idea what the problem can be ?
Thanks for help in advance !
Jules
Jules Blaidd [ julesbladd ( at ) yahoo dot com ],
2004-11-24 06:57:19
#
-
RE: SMTP Send in For...next
[ Reply ]
Hi, I have the same problem and would like to find a solution from you.
The first e-mail successfully goes out but the others were blocked in smtpmail.send.
regards
JOe [ joe ( at ) glinknet dot com ],
2005-02-24 13:53:25
#
-
another could not access cdocdo.message object
[ Reply ]
Hi,
I'm getting this error as well, and I just can't figure out where the error is originated. I tried just about everything I could find on the internet, including this site.
Can someone take a look at my stack trace to see if you can point me in the right direction? Any help would be greatly appreciated! I'm desperate...
--- Stack Trace --- "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): De transportfunctie kan geen verbinding maken met de server.
--- End of inner exception stack trace --- at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters) at System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters) at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args) at System.Web.Mail.LateBoundAccessHelper.CallMethod(Type type, Object obj, String methodName, Object[] args) at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args) --- End of inner exception stack trace --- at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args) at System.Web.Mail.CdoSysHelper.Send(MailMessage message) at System.Web.Mail.SmtpMail.Send(MailMessage message) at ConsoleApplication1.Module1.Main() in C:\Documents and Settings\Wouter\My Documents\Visual Studio Projects\ConsoleApplication1\Module1.vb:line 31" --- End Stack Trace ---
Thanks a milion.
El Loco
elloco [ elloco999 ( at ) hotmail dot com ],
2004-12-13 08:14:11
#
-
ta!
[ Reply ]
Thanks for that - it worked a treat.
ben [ ben ( at ) hyl dot co dot uk ],
2005-02-09 14:38:26
#
-
Could not access CDO.Message - A New One
[ Reply ]
Has anyone seen this before?
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 (0x80040211): The message could not be sent to the SMTP server. The transport error code was 0x800ccc13. The server response was 354 Start mail input; end with <CRLF>.<CRLF>
Shane [ shane ( at ) shanebauer dot com ],
2005-02-14 07:00:46
#
-
Windows 2000 Server with DNS Server
[ Reply ]
I tried everything in the list and almost went back to using the CDONTS object which always worked. After experimenting, here is how I solved the error: 1. Uninstalled SMTP Server 2. Reinstalled SMTP Server 3. Ran Windows Update and updated Outlook Express 4. Applied Suggestion 2 (Relay Permission) 5. Under SMTP Properties, Access Tab, clicked Connection button. 6. Selected "Only the list below" and clicked Add. 7. Typed in 127.0.0.1
Hope this helps.
Josh [ nospam ( at ) yahoo dot com ],
2005-02-27 07:51:46
#
-
The scary "Could not access 'CDO.Message' object"
[ Reply ]
Good afternoon, I'm getting "Could not access 'CDO Message' object" with inner exception: "the 'SendUsing' configuration value is invalid".
I'd appreciate any help. Thanks
pat [ lynchnco ( at ) patmedia dot net ],
2005-02-27 09:40:34
#
-
Doubt about Sending email using SmtpServer
[ Reply ]
Firstly i face the error "ERROR:Could not access 'CDO.Message' object",after visiting ur site & reading solutions this problem is solved. Now code z executing without any error ,but i'm not able to send email successfully.
The VB Code to send email is:
Dim email As New System.Web.Mail.MailMessage() email.To =" urfr_trups@yahoo.com" email.From = "trupti_pandilwar@yahoo.com" email.Body = "Hi!!How r u?" email.Subject = "Hello!" email.BodyFormat = Web.Mail.MailFormat.Text 'System.Web.Mail.SmtpMail.SmtpServer = "127.0.0.1" SmtpMail.SmtpServer.Insert( 0, "127.0.0.1") System.Web.Mail.SmtpMail.Send(email)
What should i do now? Please help me to solve my problem..
Thanks very much.
Trupti Pandilwar [ trupti_pandilwar ( at ) yahoo dot com ],
2005-03-10 05:14:26
#
-
RE: Doubt about Sending email using SmtpServer
[ Reply ]
Be carefull with using the code
SmtpMail.SmtpServer.Insert(0,"127.0.0.1");
In fact, it does not set the SmtpServer property, simply does nothing.
But the Mail.Send() works also in case when the SmptServer property is empty or null, the default SMTP server is used than.
Jakub Snopek [ jakub dot snopek ( at ) ricardo dot com ],
2005-07-11 08:51:27
#
-
RE: Doubt about Sending email using SmtpServer
[ Reply ]
-
RE: Doubt about Sending email using SmtpServer
[ Reply ]
<a href="http://onlinecasino1.000freehosting.com" title="online casino">online casino</a> Find value underlay call mit corner railbirds easy juice pot rolling!
free play online casino games [ hvbyl78 ( at ) alatavissta dot com ],
2006-01-07 08:48:56
#
-
RE: Doubt about Sending email using SmtpServer
[ Reply ]
<a href="http://craps.blog.supereva.it/" title="craps">craps</a> Find rooms hard hearts gang dime shoe shoe pot outdraw lottery outdraw hard lock!
craps [ 6t ( at ) usaa dot com ],
2006-01-10 00:45:43
#
-
RE: Doubt about Sending email using SmtpServer
[ Reply ]
<a href="http://renova.yoll.net/buy-renova-368.html" title="buy cheap renova"> buy cheap renova</a> Also croupier river speek odds paint cap tutorial etiquette ceedy spread straighten racing trips lottery omaha.
buy cheap renova [ 725i ( at ) aquaed dot de ],
2006-01-10 15:19:44
#
-
RE: Doubt about Sending email using SmtpServer
[ Reply ]
<a href="http://sonata.imess.net/cheap-sonata-829.html" title="order cheap sonata"> order cheap sonata</a> If you hanger war omaha free fill house complete face rock carpet.
cheap sonata [ 81ks ( at ) sertifi dot de ],
2006-01-10 23:03:44
#
-
RE: Doubt about Sending email using SmtpServer
[ Reply ]
<a href="http://www.ambien1.dreamstation.com/cheap-ambien-80.html" title="cheap ambien online"> cheap ambien online</a> All table insurance string hold variations semi natural up grinder hearts rank rundown finger buy exotic kings call?
cheap ambien [ 44rtavnek ( at ) usaa dot com ],
2006-01-11 02:48:09
#
-
RE: Doubt about Sending email using SmtpServer
[ Reply ]
<a href="http://www.2hot2cool.com/11/sonata" title="cheap sonata"> cheap sonata</a> Never company beard check glimmer down rooms etiquette pot flat chips fish.
cheap sonata [ 1onpp ( at ) msnn dot com ],
2006-01-11 18:20:22
#
-
RE: Doubt about Sending email using SmtpServer
[ Reply ]
<a href="http://vicodin.undonet.com/online-vicodin-515.html" title="buy online vicodin"> buy online vicodin</a> Never keno spice up spades hanger quads splash bluff pot roulette high picture percentage suit spread?
cheap online vicodin [ 821rgopwnls ( at ) seropo dot ru ],
2006-01-12 07:55:43
#
-
RE: Doubt about Sending email using SmtpServer
[ Reply ]
<a href="http://roulette.home.ph" title="roulette game">roulette game</a> Welcome nuts double tilt punto up third bet deal south outdraw stud slow wiseguy.
roulette game [ 0563gaarrgwp ( at ) smack-56 dot ru ],
2006-01-12 13:43:39
#
-
RE: Doubt about Sending email using SmtpServer
[ Reply ]
<a href="http://roulette.home.ph/615_roulette-game_740.html" title="roulette game">roulette game</a> Before freezeout river main low circle jam profit high neutral kicker ante line keno?
roulette game [ 066whr ( at ) maill dot com ],
2006-01-12 16:57:15
#
-
RE: Doubt about Sending email using SmtpServer
[ Reply ]
<a href="http://xenical1.undonet.com/872_buy-xenical_509.html" title="buy cheap xenical"> buy cheap xenical</a> Each one of flush free easy natural roulette cash neutral rock preferential jam outdraw.
buy xenical online [ 543iptmfom ( at ) maill dot com ],
2006-01-13 22:39:39
#
-
cdo exception
[ Reply ]
Yes indeed after unravelling the inner exception it turned out the mail had simply been rejected.
pat capozzi [ pat dot capozzi ( at ) excell dot com ],
2005-03-17 20:18:53
#
-
RE: cdo exception
[ Reply ]
<a href="http://groups.google.com/group/roulette-online/" title="free roulette"> free roulette</a> Look cheating bingo rounder base event diamonds ceedy coffeehouse hand gross tilt outdraw check?
free online roulette [ 864cgofv ( at ) web12-topl dot de ],
2006-01-07 16:23:53
#
-
RE: cdo exception
[ Reply ]
<a href="http://craps.2itb.com" title="craps">craps</a> Whom bet spikes call airfares railroad crack semi white tapioca progressive mechanic picture face bankroll limit buster site society credit!
craps strategy [ btl27 ( at ) alatavissta dot com ],
2006-01-08 04:21:23
#
-
RE: cdo exception
[ Reply ]
<a href="http://craps1.blogspot.com" title="craps game"> craps game</a> Her up ball clubs set martingale etiquette bust tell split come door equity tell odds!
craps online [ 4499hfm ( at ) web12-topl dot de ],
2006-01-09 06:39:01
#
-
RE: cdo exception
[ Reply ]
<a href="http://retin-a.4t.com" title="retin-a">retin-a</a> Indeed tapioca deck gang represent bust small live third tipping rock hand tutorial bankroll time.
order retin-a [ 095mblyl ( at ) treddmd dot com ],
2006-01-10 04:26:16
#
-
RE: cdo exception
[ Reply ]
<a href="http://ultram.blowsearch.ws" title="ultram">ultram</a> The pineapple kings denomination seven outdraw lottery base credit catch action hole second stand natural buster!
ultram [ 31tsslidn ( at ) gosh dot com ],
2006-01-10 05:31:55
#
-
RE: cdo exception
[ Reply ]
<a href="http://vaniqa.bravehost.com" title="online vaniqa"> online vaniqa</a> Ironically odds up pair pat over championship cheat tapioca zero nuts rake grande street.
buy vaniqa [ 87n ( at ) rosco2344 dot com ],
2006-01-10 09:14:33
#
-
RE: cdo exception
[ Reply ]
<a href="http://renova.yoll.net/" title="buy renova"> buy renova</a> By means of video hard slow tight hard chalk hanger vegas boat time fold rundown shuffling hidden!
renova [ 580lllcpmg ( at ) gmaill dot com ],
2006-01-10 15:05:58
#
-
RE: cdo exception
[ Reply ]
<a href="http://sonata.imess.net/buy-sonata-113.html" title="buy sonata here"> buy sonata here</a> As the video pot flat etiquette apple martingale layout less nuts dollar beef pot apple tap.
buy cheap sonata [ who061 ( at ) usaa dot com ],
2006-01-10 22:45:51
#
-
RE: cdo exception
[ Reply ]
<a href="http://ultram.deep-ice.com/" title="order ultram"> order ultram</a> Any kind of blind flop support first city push goulash banco call banco speek!
buy ultram [ 4399hukoeh ( at ) ssdmmfnf dot com ],
2006-01-12 03:59:50
#
-
RE: cdo exception
[ Reply ]
<a href="http://xenical.hostingrapid.com" title="xenical">xenical</a> As you see underlay price pair rules gang set front push kind hand limit variations trio line.
cheap xenical [ pkpvnypd1537 ( at ) smack-56 dot ru ],
2006-01-12 05:28:32
#
-
Could not access CDO.Message object : html vs text
[ Reply ]
This is my code : MailMessage mail = new MailMessage(); mail.To = "you@destination.be"; mail.From = "me@mylocation.be"; mail.Subject = "mysubject "; mail.BodyFormat = MailFormat.Html; mail.Body = "hello world"; SmtpMail.SmtpServer = "myserver"; SmtpMail.Send(mail);
When i run this code from a console application it works fine in both MailFormat.Html and MailFormat.Text format, but when i run it from an aspx page i can only use MailFormat.Text format. In MailFormat.Html format I get the "Could not access CDO.Message object" eror. I have already tried to put html and body tags around my text but this does not help. It is driving me crazy ! Any suggestions ?
If it is of any use, this is the innerexeption : The following exception occurred: 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 (0x80040605): Unknown Error --- End of inner exception stack trace --- at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters) at System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters) at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args) at System.Web.Mail.LateBoundAccessHelper.SetProp(Type type, Object obj, String propName, Object propValue) at System.Web.Mail.LateBoundAccessHelper.SetProp(Object obj, String propName, Object propValue) --- End of inner exception stack trace --- at System.Web.Mail.LateBoundAccessHelper.SetProp(Object obj, String propName, Object propValue) at System.Web.Mail.CdoSysHelper.Send(MailMessage message) at System.Web.Mail.SmtpMail.Send(MailMessage message) at deschutter.com.PackFlow.Web.InviteApprovers.SendMail(String toList, String pdfUrl) in c:\inetpub\wwwroot\packflow\inviteapprovers.aspx.cs:line 77--------------------------------The following InnerException reported: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x80040605): Unknown Error --- End of inner exception stack trace --- at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters) at System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters) at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args) at System.Web.Mail.LateBoundAccessHelper.SetProp(Type type, Object obj, String propName, Object propValue) at System.Web.Mail.LateBoundAccessHelper.SetProp(Object obj, String propName, Object propValue)--------------------------------The following InnerException reported: System.Runtime.InteropServices.COMException (0x80040605): Unknown Error
martin devos [ martind ( at ) deschutter dot be ],
2005-03-30 06:41:28
#
-
RE: Could not access CDO.Message object : html vs text
[ Reply ]
I have the same problem!
Could not access CDO.Message object when the body format is HTML! With body format TEXT everything works fine!
This is ridiculous!
Damir Colak [ dcolak ( at ) colaksoft dot com ],
2006-04-05 17:21:43
#
-
RE RE: Could not access CDO.Message object : html vs text
[ Reply ]
Found a solution to this one. I made sure it was nothing that was mentioned so far. Then i unregistered cdosys.dll, closed my dev environment, restarted IIS Admin server (recycles www, https, and smtp services). Then registered the DLL and restarted IIS Admin again. Then for some reason it all worked!
Windowns [ com ( at ) com dot com ],
2006-07-21 17:09:41
#
-
SmtpMail.SmtpServer.insert solved the problem and an explanation
[ Reply ]
Hi All,
This is the first time I had a CDO issue with my VB.NET just on ONE server. I was not getting an authentication issue, but a transport issue. Using the Insert command fixed it straight away, then I realised why. This server did not have any Outlook or other mail program other than Outlook Express. OE was not setup to point to an smtp server. When I was doing the usual SmtpMail.SmtpServer = "127.0.0.1" is was actually adding the address onto the mail server index (you can find the Index 0 setting in the regitry), and trying to send mail out the "invalid" or index 0 smtp entry. By inserting the valid smtp server into index 0, it works.
Robear [ robear ( at ) joshie dot com dot au ],
2005-04-12 20:00:13
#
-
Two things made CDO work!
[ Reply ]
After trying every suggestion and combination this is what we found finally worked for us (we use Remoting and our own ASPNET machine account). Try this:
1. Don't set the SMTP server (SmtpMail.SmtpServer), it's the same as using the suggested SmtpMail.SmtpServer.Insert(0, "127.0.0.1"). Just call SmtpMail.Send()
2. Set write permissions for the ASPNET machine account (or whatever account defined in machine.config) on the inetpub\mailroot folder.
Someone suggested to alter the metabase and set read permission, we tried that and it didn't help, but it could according to Microsoft: "No special permissions are required to run interactive applications or ASP pages to enable use of CDOSYS. In applications that use the SMTP or NNTP drop-directory, the application or user must have permission to write into that directory. When running an application that sends e-mail, the user will require either write access to the pick-up directory, or read access to the IIS metabase so the application can determine the SMTP port used for sending mail."
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/e2k3/e2k3/_techsel_criteria_20.asp
frasse [ lisse ( at ) sverige dot nu ],
2005-04-21 09:44:40
#
-
Sending mail from asp.net
[ Reply ]
Hi check my link here.
http://spaces.msn.com/members/devicharan/
you have solution there
could not access cdo.message object [ devicharan dot vinnakota ( at ) majoris dot com ],
2005-04-27 22:48:14
#
-
email sending with attachment pdf file above 100kb size
[ Reply ]
i m sending email with attaching pdf file greater than 100 kb size and it will give me error unspecified error plz solve my prob immediately
ashwini [ ashwini_svartak ( at ) hotmail dot com ],
2005-05-06 01:19:45
#
-
RE: email sending with attachment pdf file above 100kb size
[ Reply ]
Hi,
This site is terrific! Thank you so much for the help!! I am having the same problem. When I try SmtpMail.Send with a small (attached) file (20K) everything works fine but when it's a larger file (9MB) it fails with:
The message could not be sent to the SMTP server. The transport error code was 0x800ccc13. The server response was not available.
Here is some of the stack trace info: -------------------------------- Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException: The message could not be sent to the SMTP server. The transport error code was 0x800ccc13. The server response was not available
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[COMException (0x80040211): The message could not be sent to the SMTP server. The transport error code was 0x800ccc13. The server response was not available ]
[TargetInvocationException: Exception has been thrown by the target of an invocation.] System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters) +0 System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters) +473 System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args) +58
[HttpException (0x80004005): Could not access 'CDO.Message' object.] System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args) +111 System.Web.Mail.CdoSysHelper.Send(MailMessage message) +1863 System.Web.Mail.SmtpMail.Send(MailMessage message) +150 ----------------------------------- I did set the "Limit message size to (KB)" and "Limit sessioni size to (KB)" SMTP fields to 12288, and restarted the SMTP service. Same results.
Any ideas would be greatly appreciated!
Thanks.
Larry
Larry Ouellette [ larry dot ouellette ( at ) hp dot com ],
2005-07-07 11:06:34
#
-
What I learned
[ Reply ]
I tried a lot of what you said here and found a few things out, the SmtpMail.SmtpServer.Insert( 0, mailServer) appears to just use the local host (default) SMTP server I guess it works for a lot of people because there local server is setup differently to their mail server.
The following seemed to be the most robust setting for mailing from ASP.NET for me.
SmtpMail.SmtpServer = mailServer; MailMessage mailMessage = new MailMessage(); mailMessage.BodyFormat = MailFormat.Text ; mailMessage.From = from; mailMessage.To = recipient; mailMessage.Subject = subject; mailMessage.Body = body;
mailMessage.Headers.Add("Reply-To",from); mailMessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout", 60); mailMessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); mailMessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", username); mailMessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", password);
SmtpMail.Send(mailMessage);
The mail server in this case is an exchange server.
This info was snatched from http://www.devnewsgroups.net/group/microsoft.public.dotnet.framework/topic11061.aspx
D
Great site, it was invaluable.
David [ dsmith ( at ) origin-data dot co dot uk ],
2005-05-09 09:11:03
#
-
This was the solution!
[ Reply ]
Can somebody explain why that works?
David [ profnachos ( at ) yahoo dot com ],
2005-05-10 13:24:36
#
-
VirusScan
[ Reply ]
By default, VirusScan in its infinite wisdom blocks SMTP from unknown apps. To shut this off, go to the VirusScan console and uncheck the SMTP rule.
Michael Carr [ mcarr ( at ) umich dot edu ],
2005-05-21 17:41:46
#
-
RE: VirusScan
[ Reply ]
This also fixed my problem. Turning "On Access Scan" off for McAffee AV 8.0i allows the emails to go out. Unchecking "Prevent Mass Mailing worms from sending email" will unblock port 25, allowing emails to go out. Thinking about this more, anything that can block port 25 would probably cause your application to fail. So check your firewalls too!
Daniel Jue [ djue ( at ) isr dot umd dot edu ],
2005-08-23 10:36:08
#
-
Running On Desktop
[ Reply ]
After many hours of looking through everybodies answers I didnt see anything that had to do with a Desktop solution. So here is what i did to get mine working;
You have to uninstall Outlook express. Reinstall it then register the cdosys.dll
In the run command; regsvr32 "c:\WINDOWS\system32\cdosys.dll
Michael McMullen [ plasma_z ( at ) mail dot com ],
2005-06-04 12:23:13
#
-
The scary "Could not access 'CDO.Message' object"
[ Reply ]
Greetings, all:
I thought I would offer up something that worked for us here, that I did not see in all the discussions.
Our company uses an enterprise edition of McAfee AntiVirus. This means on every computer in the building, there are two little icons in the system tray that look like roman shields, and all their menu items are disabled by administrative domain policy so that we cannot reconfigure them in any way.
Turns out, McAfee was blocking TCP 25 Outbound on our computers. (We use Outlook / Exchange for mail here, which uses MAPI over RPC ports).
So I goto Administrative Tools -> Services and disable the three "McAfee" and "Network Associates" related services, and presto, my code can send an SmtpMail.
Peace & stuff!
Mike Labosh, MCSD "Escriba coda ergo sum." -- vbSensei
Mike Labosh [ mlabosh ( at ) hotmail dot com ],
2005-06-17 13:18:00
#
-
Simplest Way to send a mail in VB.NET
[ Reply ]
I have tried the code below and it is working: BN: I am using VB.NET with VS.NET Architect 2003
1. Add the COM reference "Microsoft ActiveX Data Objects 2.8 Library" 2. Add the COM reference "Microsoft CDO for Windows 2000 Library" or browse it at "c:\windows\system32\cdosys.dll" 3. Use the following sub to send your message. Provide the required parameters:
Public Sub SendMail(Byval AdrFrom As String ByVal AdrTo As String, ByVal AdrCC As String, ByVal MailBody As String)
Try Dim oMessage As CDO.Message 'Create a Message Object oMessage = CreateObject("CDO.Message")
With oMessage 'Set the properties .To = AdrTo .From = AdrFrom .TextBody = MailBody .Subject = "Reminder: Actions to take for listed Staff" .Configuration.Fields.Item("CdoSendUsing").Value = CDO.CdoSendUsing.cdoSendUsingPickup 'Using Exchange Server .Configuration.Fields.Update() .Send() End With Catch ex As Exception Console.WriteLine(ex.Message) End Try End Sub
I hope this will help many of you.
Gildas Makaya [ makayag ( at ) afro dot who dot int ],
2005-06-22 04:19:14
#
-
Could not access 'CDO.Message' object
[ Reply ]
I had this problem and found that The .Net library use the default e-mail account for sending e-mail. Setting correct e-mail account as default e-mail account in outlook express resolved my problem.
Kashif Mushtaq [ kashifmushtaqpak ( at ) yahoo dot com ],
2005-07-06 15:48:42
#
-
Problem in sending mail"Could not access 'CDO.Message' object"
[ Reply ]
Dear Sir We r from dimensionslive.com and we have a problem in sending mail from our subdomain "gotopoints.dimensionslive.com" but this mailing sevice is working smoothly in our local Server.Please give me ur suggestion to how can i sove this problem?
we r getting an error that i iveb bellow
System.Web.TraceContextSystem.Web.TraceContext
System.Web.TraceContext
Could not access 'CDO.Message' object.Customer at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args) at System.Web.Mail.CdoSysHelper.Send(MailMessage message) at System.Web.Mail.SmtpMail.Send(MailMessage message) at GoToPoints.Business.GiftCertificate.mailtoCustomer() in c:\inetpub\wwwroot\gotopoints\business\giftcertificate.aspx.cs:line 96
System.Web.TraceContext Could not access 'CDO.Message' object.business at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args) at System.Web.Mail.CdoSysHelper.Send(MailMessage message) at System.Web.Mail.SmtpMail.Send(MailMessage message) at GoToPoints.Business.GiftCertificate.mailtoBusinessOwner() in c:\inetpub\wwwroot\gotopoints\business\giftcertificate.aspx.cs:line 64 Thankyou Rakesh Sankar
Rakesh [ rakeshsankar007 ( at ) yahoo dot co dot in ],
2005-07-12 00:35:32
#
-
Library not registered - CDO ( Urgent Help )
[ Reply ]
My sending mail logic is built into a .net library dll. When invoked from a Windows application built using .NET the sending mail works. When invoked from a asp.net web application it fails with the following error. I have gone through all your articles and found that only cdosys.dll is loaded. But still get this error.
Library not registered. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException: Library not registered.
Source Error:
Line 207: kanautils.utils myutil = new kanautils.utils(); Line 208: myutil.smtpserver = smtpserver; Line 209: myutil.sendMail(sempmail,smgrmail,ssubject,sbody); Line 210: Line 211: sbody = "<font size=3 face=arial>Your <b>modified</b> PTO request submission made on " + DateTime.Now + " for the dates between, " + dateFrom.Text + " and " + dateThru.Text + ", has been forwarded to your Manager " + smgrname + " for approval.<br><br>If you do not receive an approval/disapproval notification email within 5 days, please contact your manager.<br><br>Regards,<br><br>Kana Payroll Department</font>";
Source File: c:\inetpub\wwwroot\pto\editpto.aspx.cs Line: 209
Stack Trace:
[COMException (0x8002801d): Library not registered.] System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters) +0 System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters) +473 System.Web.Mail.LateBoundAccessHelper.SetProp(Object obj, String propName, Object propValue) +87
[HttpException (0x80004005): Could not access 'CDO.Message' object.] kanautils.utils.sendMail(String sfrom, String sto, String ssubject, String sbody) in c:\documents and settings\vsrinivasan\my documents\visual studio projects\kanautils\utils.cs:58 pto.editPto.sendModifiedNotification(String smtpserver, String sempname, String smgrname, String sempmail, String smgrmail) in c:\inetpub\wwwroot\pto\editpto.aspx.cs:209 pto.editPto.btnPtoSubmit_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\pto\editpto.aspx.cs:191 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 System.Web.UI.Page.ProcessRequestMain() +1273
Version Information: Microsoft .NET Framework Version:1.1.4322.2300; ASP.NET Version:1.1.4322.2300
Any ideas?
Vasu Tirunelvelly [ srinivasnh ( at ) gmail dot com ],
2005-08-08 19:48:04
#
-
No more exceptions. But emails are not delivered!
[ Reply ]
Hi. I've implemented the sending of the message the with the setting "localhost" and into Virtual SMTP Server's configuration in IIS I added the ip of my machine into Relay section. No more exceptions now received, but the messages are not delivered. What could it be? Thanks!
Vlad [ v_maevski ( at ) yahoo dot com ],
2005-08-18 22:18:54
#
-
MailMarshal + CDO
[ Reply ]
I could not send an email from my asp.net app to email addresses outside the domain (like yahoo.com, or gmail.com). I found out that the web host box has the mailmarshal running on it. Is there any conflict that you may have encountered?
thanks and have a great day everyone.
--Calsun
CalSun [ nnngoan ( at ) yahoo dot com ],
2005-09-01 13:03:33
#
-
127.0.0.1 instead of localhost
[ Reply ]
i Had this error and tried 127.0.0.1 instead of localhost an it worked.
ta [ tim_auriemma ( at ) yahoo dot com ],
2005-09-14 09:37:38
#
-
Can send locally but not f
[ Reply ]
Hi,
When I'm using CDO mail at local host, it is working fine. But when i uploaded my contact.aspx on the server (omnis.com), it is returning the following error:
9/23/2005 4:30:05 AM Could not access 'CDO.Message' object. at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args) at System.Web.Mail.CdoSysHelper.Send(MailMessage message) at System.Web.Mail.SmtpMail.Send(MailMessage message)
I tried uploading contact.aspx in another server and it's working fine. So I get an impression that there is something wrong with omnis. It is running .NET 1.1. So there should not be any problems...
Can anyone help? Cheers!
Andry Poernomo [ suencien ( at ) hotmail dot com ],
2005-09-22 23:12:38
#
-
RE: Can send locally but not f
[ Reply ]
omnis.com may not have SMTP server installed. A quick look at your DNS records shows your MX (mail server) to be postoffice.omnis.com - 216.239.128.25. A ping of http://www.omnis.com returns an IP of 2162239.128.66. Different IP, could be different machine.
anon [ spoo ( at ) spoodee dot com ],
2005-12-22 12:42:17
#
-
Out of memory
[ Reply ]
I am getting a "Could not access CDO.Message object" exception in my application. There are a few places where we send email, and they all use the same SendMail function located in a General Functions library. These other places work fine. My error comes from a broadcast email utility for our marketing department. The utility gathers all of the email addresses and puts them in the BCC field. There is no address in the TO field of the email, but that is allowed. We did this so we only had to send out one email.
The Inner Exception is : System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.OutOfMemoryException: Not enough storage is available to complete this operation.
My problem is that I watched the processes on the server when a user tried to use this utility, and she recieved the error, but the Task Manager did not show an increase in Memory usage.
I am truly stumped. We have added more memory, and it still has not corrected the problem.
Please help me out here.
Nate Stelzner [ nstelzner ( at ) gmail dot com ],
2005-10-03 12:40:13
#
-
Insert(0, "127.0.0.1") - works
[ Reply ]
Damnest thing Try configure/reconfiguring server. Different code. Damnest thing - I figured I tried everything else - the insert works????
T. Chambers [ krinsenconnini ( at ) yahoo dot com ],
2005-10-04 23:06:04
#
-
Intermittant Errors
[ Reply ]
I am receiving this error message also, but it is intermittant. The majority of the time my application will send the emails fine, but on rare occasions I get this error message.
I have all of the posters info. sent to me in an email when there is an error, and I retried posting the exact information the poster submitted and was sucessful (no errors).
Anyone know why sometimes you would get this message, but not all the time?! Could it be that anti-virus software on the server might be scanning and locking this library (just every once and a while!)? I'm pretty clueless.
Travis [ brazill ( at ) uidaho dot edu ],
2005-10-05 16:40:13
#
-
RE: Intermittant Errors
[ Reply ]
I'm experiencing the same intermittent error. Did you ever determine the cause?
paul [ pelstone ( at ) qch dot on dot ca ],
2006-05-11 11:13:05
#
-
could not access cdo message
[ Reply ]
Here is the inner message I am recieving. "The message could not be sent to the SMTP server. The transport error code was 0x80040217. The server response was not available." I am authenticating and my netwrok admin swears their is nothing wrong with the smtp server. Please help!
adam [ ahager_temp ( at ) qeddata dot com ],
2005-11-02 11:04:19
#
-
another permissions solution
[ Reply ]
We tried everything in every single Part (1 - 8) here in the FAQ, to no avail. We had a specific setup that may have contributed...
We have an ASP.NET application on our Intranet web server that uses System.Web.Mail to send mail external to our network, using our Exchange server for the SMTP server (not localhost). We are using impersonation (<impersonation="true" />) to for Authorization purposes as well as to avoid having to give the ASPNET account the keys to the kingdom.
Everything in the application worked beautifully until we upgraded the Exchange Server to 2003. Then, the scary message began, and we went through everything on here.
Once we realized that local Administrators (local to the Intranet Web server) could use the application fine but not regular users, we tried various things with specific non-administrator accounts. We were finally able to determine that a Power User could send a message without getting the error.
We narrowed it down even further to the specific permission "Profile Single Process". When we gave the account that is attempting to send the mail (ASPNET unless you are using impersonation) only the additional "Profile Single Process" permission (using User Rights Assignment in the Security Settings) a non-Power User was still able to send email.
Don't know what it works (I have some fairly semi-educated guesses...), but it does.
Hope this helps someone else!!!
Paulette
Paulette Neal-Allen [ paulette dot neal-allen ( at ) cityofthornton dot net ],
2005-11-10 13:55:51
#
-
Suggestion 6 worked for me!
[ Reply ]
Don't know why it worked, but it worked a treat, gotta love consistency!
Tim McOwan [ mynameallinone ( at ) hotmail dot com ],
2005-11-15 03:22:33
#
-
Do Not User SmtpServer.Insert
[ Reply ]
The following code is a myth and does nothing...
SmtpMail.SmtpServer.Insert(0,"127.0.0.1"); //specifying the real SMTP Mail Server.
Please see my article on this subject...
MYTH: SmtpMail.SmtpServer.Insert(0,"127.0.0.1") Actually Does Something[^]
Matt Stehle - Microsoft Developer Support Team, Messaging and Collaboration http://blogs.msdn.com/mstehle/
Matt [ stehlewm ( at ) gmail dot com ],
2005-11-23 12:21:21
#
-
Mail size issue
[ Reply ]
Hi I've got an asp .net mail app, sending 2 attachments, following the same code as mentioned, and using CDO, and it works great, except if the mail size goes over 105Kb, then I get the unspecified error. Any ideas?
Schalkwi [ schalkwin ( at ) superitum dot com ],
2005-12-09 02:02:59
#
-
I got it.
[ Reply ]
I used a combination of things to make this work. [config] Server win2k3. IIS NOT Installed. Used external smtp server. .mailformat = html [/config]
I used suggestion 6, but not with the IP name. I made a call to the registry to pull a custom string containing not the NAME of the SMTP server, but the IP Address of the SMTP server.
Suggestion #6 CANNOT RESOLVE TO LOCALHOST because there is no SMTP server, or any resemblance to a web server i.e IIS installed on the box (unless the .NET framework does some kind of nonsense I do not know about.) Outlook Express is not installed.
For the record - there were no DNS errors on the network and port 25 was opened on the SMTP server. Name resolved fine from server A to server B.
Key - Use the IP Address with suggestion #6. Passing it as a variable seems to work ok as well as hard coding it...which makes sense. But with this, rational thinking does not apply.
Microsoft is too quiet about this. Something's up.
Dave [ calibrated ( at ) gmail dot com ],
2005-12-16 07:36:58
#
-
Application Data\Microsoft\Crypto\RSA\MachineKeys Permissions Problem
[ Reply ]
Well you should add a number 7.
A few hours on the phone with Microsoft revealed this as the problem. I hope this helps some people, and saves hours and hours of troubleshooting:
http://support.microsoft.com/?id=246459
Essentially permissions on the "C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys" folder.
Nathan Rice [ naterice ( at ) hotmail dot com ],
2005-12-19 09:08:51
#
-
Look at your antivirus settings
[ Reply ]
For me the problem was tha McAfee VirusScan was blocking the SMTP port to all but a few known applications. After adding my application to the list, the 0x800ccc15 error went away.
Specifcally in McAfee, open up the VirusScan console. Go into the Access Control tool. Highlight "Prevent mass mailing worms from sending mail" and click "Edit...". Add your exe to the Excluded Processes.
Piers Lawson [ Piers ( at ) Piers dot com ],
2005-12-22 04:06:35
#
-
SmtpMail.SmtpServer Value
[ Reply ]
I would like to point out that Insert is a function that returns the result of whatever operation you have requested in the parameters passed to it, but does nothing to the original value. The original value of SmtpMail.SmtpServer remains unchanged. Strings are immutable meaning their value cannot be changed once created.
In any case, the result of doing: <smtpMailObject>.smtpserver.insert(0,"server name") is the exact same as not setting a value to SmtpMail.SmtpServer at all.
If you commented out the line with the Insert function, I imagine your code would still work. By not setting a value to SmtpMail.SmtpServer, you are telling CDO to drop the mail to the SMTP service on the local server.
Jon Okie [ jonokie ( at ) hotmail dot com ],
2005-12-22 11:34:44
#
-
Awesome
[ Reply ]
This worked for me... wicked!! the
SmtpMail.SmtpServer.Insert( 0, "127.0.0.1 or your mail server name here")
yippee headache gone!
joe [ joe ( at ) aol dot com ],
2006-01-27 16:12:15
#
-
CDO.Message object access is denied
[ Reply ]
It's really a helpful site. I met the same scary error "Could not access 'CDO.Message' object". But when I drilled down the exception layers, I found my asp.net application threw the UnauthorizedAccessException exception with source CDO.Message object. I have tried some of your suggestions but none worked. And I have checked the CDO.Message permissions in the register table.
Some guy suggests to change the machine.config of the .net framework. But I think it's not a good idea.
I'm confused about the cause now. Who can help me?
Thanks you all in advance.
Wangqiu Zhang [ changwang23 ( at ) 163 dot com ],
2006-02-07 01:06:46
#
-
Cdo problem
[ Reply ]
<% Set myMail=CreateObject("CDO.Message") myMail.Subject="Sending email with CDO" myMail.From="mymail@mydomain.com" myMail.To="someone@somedomain.com" myMail.TextBody="This is a message." myMail.Send set myMail=nothing %>
I use the following code but not working please give some suggestion. thanks in advance.
Nabi_bux [ jeo_baloch ( at ) yahoo dot com ],
2006-02-15 22:21:52
#
-
RE: Cdo problem
[ Reply ]
Hi.,
Use the following code format.
MailMessage myMail = new MailMessage();
myMail.From = sFromAdd; myMail.To = sToAdd; myMail.Subject = sSubject; myMail.Body = sBody; myMail.BodyFormat = mailFormat.Html; myMail.Priority = MailPriority.Normal; SmtpMail.SmtpServer = "SmptAddress IP"; SmtpMail.Send(myMail);
Vijay [ vijayakumar dot M ( at ) talentmaximus dot com ],
2006-03-10 05:41:38
#
-
Cdo problem
[ Reply ]
<% Set myMail=CreateObject("CDO.Message") myMail.Subject="Sending email with CDO" myMail.From="mymail@mydomain.com" myMail.To="someone@somedomain.com" myMail.TextBody="This is a message." myMail.Send set myMail=nothing %>
I use the following code but not working please give some suggestion. thanks in advance.
Nabi_bux [ jeo_baloch ( at ) yahoo dot com ],
2006-02-15 22:30:10
#
-
Suggetion For CDO Message object.
[ Reply ]
write the same code u write for sending the mail and host the web service on the server from where u want to send the mail(SMTP server).The mail will go under the server where the web service is hosting.
The problem was that when u send the mail it will go relay mail from the local server where it is the hosted and there fore it wont take the smtp server as argument.so the best solution i wish is the web service and host it on the server from where u want to relay the mails.
and do not specify the SMTP server name for the property of " SmtpMail.SmtpServer = smtpServer"
Thanks & Regards -------------------------------- From: nitin kale Kosher softwares Jr.Software engineer .Net Team. Indore
nitin kale [ kale_nitin82 ( at ) hotmail dot com ],
2006-02-19 22:24:10
#
-
Can't send mail
[ Reply ]
Hi, I have a big problem, i can't send mail to address like hotmail, yahoo, etc. Does anybody have an answer to this??
Enrique Martinez [ emartinezsolis ( at ) hotmail dot com ],
2006-02-27 18:36:07
#
-
RE: Can't send mail
[ Reply ]
Iam also having same problem in sending mails using CDONTS to my surprise the mails which i send thru the VB exe is on the queue of (c:\inetpub\mailroot\queue") but not sending
Muralikrishnan [ muralikrishnan dot g ( at ) ge dot com ],
2006-05-04 02:55:44
#
-
CDO.Message
[ Reply ]
i m getting problem with cdo.message, anyone help me
durga Prasad [ durga_eleven ( at ) yahoo dot co dot in ],
2006-03-06 22:15:41
#
-
Suggestion 6 Debunked
[ Reply ]
This article explains why using SmtpMail.SmtpServer.Insert(0,"...") does NOT work as intended. It doesn't "fix" anything, and simply commenting out your SmtpServer property assignment will yield the same result:
http://blogs.msdn.com/mstehle/archive/2005/11/23/496418.aspx?Ajax_CallBack=true
Learn what string.Insert() really does and you'll see that this method is naive at best.
Brian [ baalexander ( at ) firstam dot com ],
2006-03-20 13:25:42
#
-
My findings on this subject
[ Reply ]
It seems in my case the problem was directly related to the windows version.
users WITH xp professional should try to clear the smtp server name in vb(set it to default) and restart the iis virtual webserver. Now (in my case) the vb application was able to send mail
users with "normal" windows xp version should try this: start --> run --> "cmd" --> "telnet your.mailserver 25" if you get a connection, your vb application should also be able to send emails. IF you have a firewall (or whatever security), windows will ask you if you want to grant acces once, forever or deny access. -- click grant access forever (or whatever the term is). from now on your vb application should also be able to send mail.
hope this is useful information!
regards, wouter
wouter de jong [ wotax ( at ) hotmail dot com ],
2006-03-24 03:22:54
#
-
CDO Object
[ Reply ]
Make sure you have everything exact the message.to , .cc, .bcc. Everything. Sending email is very tempermental.
-pfalco
Peter Falco [ peter dot falco ( at ) verizon dot net ],
2006-04-04 13:39:11
#
-
Not Getting mail through smtpmail.send
[ Reply ]
hi, i'm using the code below...
objMM.To = "my email address" objMM.From = "my email address" objMM.BodyFormat = MailFormat.Text objMM.Priority = MailPriority.Normal objMM.Subject = "Hello there!" objMM.Body = "Hi!" & vbCrLf & vbCrLf & "How are you doing?"
SmtpMail.SmtpServer = "localhost" SmtpMail.SmtpServer = "127.0.0.1" 'SmtpMail.SmtpServer.Insert(0, "127.0.0.1") SmtpMail.Send(objMM) Trace.Write("Success")
it works, but i'm not getting any email to the email address i'm sending it to.
can anybody help me solving this problem. i'll really appreciate that. thanx
Roddur [ smmr_emon ( at ) yahoo dot com ],
2006-04-10 01:14:06
#
-
One possible Solution for Error 0x800ccc15
[ Reply ]
I had trouble for send mails with a external server. I have installed McAffe Viruscan 8.0. This software enabled the smtp communication port 25. In the Viruscan Console, in access protection item, i descheck the check about worms that refers port 25, and all ok!!! I hope it will be usefull!
Hector [ novella ( at ) gmail dot com ],
2006-04-13 01:30:39
#
-
RE: One possible Solution for Error 0x800ccc15
[ Reply ]
Yes. I've been trapped by this too.
But if in deployment machine, I'll recommend adding your program/ASP.NET worker in the exception list instead.
Cheong [ cheong ( at ) ixasia dot com ],
2006-04-19 00:17:21
#
-
RE RE: One possible Solution for Error 0x800ccc15
[ Reply ]
Unblocking port 25 from Virus Scan did solve my problem. But how can I add my program in the exception list? I'm sending mail using ASP(not .NET) and inetinfo.exe is already in the list!What else I should put there?
Raghu [ raghu ( at ) yahoo dot com ],
2006-06-15 11:40:31
#
-
FIXED "Could not access 'CDO.Message' object"!!! :D
[ Reply ]
Try to use:
MailMessage mail = new MailMessage(); mail.To = "someone@somewhere.com"; mail.From = "you@yourcompany.com"; mail.Subject = "this is a test email."; mail.Body = "Some text goes here";
mail.Fields["http://schemas.microsoft.com/cdo/configuration/smtpserver"] = "smtp_here"; mail.Fields["http://schemas.microsoft.com/cdo/configuration/smtpserverport"] = 25; mail.Fields["http://schemas.microsoft.com/cdo/configuration/sendusing"] = 2; mail.Fields["http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"] = 1; mail.Fields["http://schemas.microsoft.com/cdo/configuration/sendusername"] = "username"; mail.Fields["http://schemas.microsoft.com/cdo/configuration/sendpassword"] = "yourpassword";
SmtpMail.SmtpServer = "smtp_here"; SmtpMail.Send( mail );
Good luck! :D
Ngoc Luu [ ngocluu dot net ( at ) gmail dot com ],
2006-05-17 00:46:19
#
-
Need a solution ASAP
[ Reply ]
I have used the system.web.mail namespace to send a mail through my ASP.NET application. I am pasting the code piece for your ref: ******************************** mailobj = New MailMessage mailobj.From = companyname@companyname.com mailobj.To = txtEmailID.Text.Trim mailobj.Body = "Your password is: " & lstrPwd mailobj.Subject = "Your password" mailobj.BodyFormat = MailFormat.Html mailobj.Priority = MailPriority.Normal Try lobjsmtp.SmtpServer.Insert(0, smpt server ip adrress which is configured in our ) lobjsmtp.Send(mailobj) Catch ex As Exception Response.Write(ex.ToString) End Try *******************************
I have configured my smptserver as the company smtp server address but still i get the error:
I have tried all the suggestions put in the http://www.systemwebmail.com/faq/ website but could not find any solution
Let me be very clear i am sending this mail through my application NOT through my localhost address but my Company SMPT server Address. Even if i try with LocalHost address i get a same error.
Please provide me with good solution Thanks in advance
Sunitha [ sunitha ( at ) allegisindia dot com ],
2006-06-07 04:36:41
#
-
"Could not access 'CDO.Message' object"
[ Reply ]
Hi i have got the same problem. The inner exception is 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. --- End of inner exception stack trace --- at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters) at System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters) at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args) at System.Web.Mail.LateBoundAccessHelper.CallMethod(Type type, Object obj, String methodName, Object[] args) at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args)
My code is MailMessage mail = new MailMessage(); mail.To = "me@mycompany.com"; mail.From = "you@yourcompany.com"; mail.Subject = "this is a test email."; mail.Body = "this is my test email body"; SmtpMail.SmtpServer = "localhost"; //your real server goes here SmtpMail.Send( mail );
Plz let me know how to solve it
Iftikar [ mail4iftikar ( at ) gmail dot com ],
2006-06-09 23:33:01
#
-
RE: "Could not access 'CDO.Message' object"
[ Reply ]
Hi All,
I also had this error and couldnt figure out for hrs, as the mail would work normally but when i append a stack trace of it it will fail.
Our smtp server also didnt had any problems. but after debuging the code i realized that the body of the mail which is sent and had stack trace of an error it failed. So i tried to clear the body of the email and try to sent it.. and magic it worked!!!.
So after a bit of trial and error i figured VbLf which is in the stack trace was a problem.
Tried to replace vblf with vbcrlf and then sent the email and it worked. So i guess if u guys have this problem then replace the vblf with any thing else.
This is one of the factor which causes this error. This error has a vast meaning, so i just want to say that if u have some thing strange in the body it might not work, depending on yr smtp settings.
Cheers Chintan
Chintan Jajal [ jajalc ( at ) gmail dot com ],
2006-06-17 20:09:34
#
-
undelivery email messages
[ Reply ]
Hi all
Thanks for the suggestions listed. It helps me a lot
Now what I'm having is when i try to send a email smtp server will send the mail to the Badmail folder. help me. These are the code i'm getting on those files
From: postmaster@cmcoldb To: sfern@sltnet.lk Date: Thu, 13 Jul 2006 08:30:49 +0600 MIME-Version: 1.0 Content-Type: multipart/report; report-type=delivery-status; boundary="9B095B5ADSN=_01C6A61E0043B10600000001cmcoldb" Message-ID: <FRaqbC8wS00000001@cmcoldb> Subject: Delivery Status Notification (Failure)
This is a MIME-formatted message. Portions of this message may be unreadable without a MIME-capable mail program.
--9B095B5ADSN=_01C6A61E0043B10600000001cmcoldb Content-Type: text/plain; charset=unicode-1-1-utf-7
This is an automatically generated Delivery Status Notification.
Delivery to the following recipients failed.
nimal@ncr.com
1st file
--9B095B5ADSN=_01C6A61E0043B10600000001cmcoldb Content-Type: message/delivery-status
Reporting-MTA: dns;cmcoldb Received-From-MTA: dns;cmcoldb Arrival-Date: Thu, 13 Jul 2006 08:30:49 +0600
Final-Recipient: rfc822;nimal@ncr.com Action: failed Status: 5.3.5
--9B095B5ADSN=_01C6A61E0043B10600000001cmcoldb Content-Type: message/rfc822
Received: from cmcoldb ([127.0.0.1]) by cmcoldb with Microsoft SMTPSVC(6.0.2600.1); Thu, 13 Jul 2006 08:30:49 +0600 thread-index: AcamJFnIWV6FTJ0dS0i0WYJ+Ok9SeQ== Thread-Topic: Disapproval Notification From: <sfern@sltnet.lk> To: <nimal@ncr.com> Subject: Disapproval Notification Date: Thu, 13 Jul 2006 08:30:48 +0600 Message-ID: <000001c6a624$5a3b5870$0100007f@cmcoldb> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft CDO for Windows 2000 Content-Class: urn:content-classes:message Importance: normal Priority: normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Return-Path: sfern@sltnet.lk X-OriginalArrivalTime: 13 Jul 2006 02:30:49.0123 (UTC) FILETIME=[5A559730:01C6A624]
test
--9B095B5ADSN=_01C6A61E0043B10600000001cmcoldb--
2nd file
vCMM ` vGPT° ÿÿÿÿvLPT8 d \ vMPTÿÿÿÿè € :~›`ÉѪ^ ÀO£[‚C:\Inetpub\mailroot\Queue\NTFS_5a749f8601c6a62400000002.EML l vPFSÿÿÿÿ` N P 0 ¸ ( Ì ' Ô 0 Ø Ü # ì " ¸ ' ( ! à ä ì ô ü Version: 6.0.2600.1 CMCOLDB <> sfern@sltnet.lk postmaster@cmcoldb <FRaqbC8wS00000001@cmcoldb> š ¬ þÿÿÿvPFSÿÿÿÿ œ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ vRPTÿÿÿÿˆ ÿÿÿÿsfern@sltnet.lk sltnet.lk Delivery Status Notification (Failure) ! öü’Z$¦ÆöÜÇÆö|f¯¶§ÆöÜÇÆö|f¯¶§Æ
3rd file
Unable to deliver this message because the follow error was encountered: "This message is a delivery status notification that cannot be delivered.".
The specific error code was 0xC00402C7.
The message sender was <>.
The message was intended for the following recipients. sfern@sltnet.lk
Supun Fernando [ supunf ( at ) gmail dot com ],
2006-07-12 19:59:24
#
-
send email using smtp
[ Reply ]
i am trying to send email using vb.net application. i had set the server name property and changed the relay settings also. I am not using local host. No error message is generated but my mail is not delivered. how to check a from address is a valid address on smtpmail.smtpServer.
Thanks
sam [ suha_in ( at ) rediffmail dot com ],
2006-07-19 06:56:40
#
-
RE: send email using smtp
[ Reply ]
This May be the error becaouse for Acess Protection policy.Please uncheck the Prevent mass mailing worms from sending mails and it will work.
Sameer Mulgaonkar [ sameer dot mulgaonkar ( at ) bsmail dot com ],
2009-12-18 05:50:45
#
-
CDO exception
[ Reply ]
Suggestion 6 it worked fine for me. Thanks!! :)
cgg2006 [ claudiu_gilmeanu ( at ) yahoo dot com ],
2006-08-04 02:26:02
#
-
If code in .aspx can send e-mail, but the compiled dll cannot
[ Reply ]
Solution:
Try to recompile your .dll on the production server - it did solve my problem:
If you do not know how to compile on server here is a hint (will only compile .cs files in current working dir and create a dll called Solution.dll) :
c:\WINDOWS\microsoft.net\framework\v1.1.4322\csc /o /out:Solution.dll /t:library *.cs
Øyvind Neuman [ cdomessage ( at ) agurk dot com ],
2006-09-12 01:48:49
#
-
Weird GMail error
[ Reply ]
I've got it set up to use gmail (see code below). Everything works quite well, actually, EXCEPT for one particular email account. I've created an "admin" account that I'd like to use to send emails from since GMail automatically replaces the "from" field with whoever you're using to send emails from. When I use this account, I get the following exception(s) (inner ones are unraveled):
Could not access 'CDO.Message' object. Exception has been thrown by the target of an invocation. The message could not be sent to the SMTP server. The transport error code was 0x80040217. The server response was not available
When i use my own personal gmail account, all is well. I have indeed confirmed that my username and password are correct. :) Any ideas?
Thanks! -MMAS MailMessage mmAlert = new MailMessage(); mmAlert.From = strSenderEmail; mmAlert.To = strRecipientEmail; mmAlert.Priority = MailPriority.Normal; SmtpMail.SmtpServer = "smtp.gmail.com"; // - smtp.gmail.com use smtp authentication mmAlert.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); mmAlert.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "some_name@gmail.com"); mmAlert.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "some_pass"); // - smtp.gmail.com use port 465 or 587 mmAlert.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", "465"); // - smtp.gmail.com use STARTTLS (some call this SSL) mmAlert.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpusessl", "true");
SmtpMail.Send(mmAlert);
MMAS [ mustafashabib ( at ) sbcglobal dot net ],
2006-10-06 21:34:35
#
-
CDO.Message object
[ Reply ]
This site was very helpful. It taught me all the settings and issues surrounding the environment the SMTP server will need to have to succeed.
These particular suggestions did not work for me but I needed to know about those settings anyway.
In my case, the Network Associates Anti-virus software was preventing my SMTP object in code from accessing the server. After going into the anti-virus software console and disabling the button that prevents mass mailing on SMTP's default port(25) my software was immediately able to send email using the system.web.mail.smtp functionality.
My wonderfully talented network support guy found this for me.
Dave Fowler [ dfowler ( at ) acainc dot com ],
2006-12-01 08:05:40
#
-
Could not access CDO.Message object
[ Reply ]
If you are using System.Web.Mail.. and you using this format "\name\ <email@mail.com>;" MAKE SURE you do NOT have a space in between any of the \name\ <email@mail.com>.. "\name\<email@mail.com> (notice no space between \ and <.. this will result in a system.web.mail error. Have fun !!
Nicolas Ruete [ nicolasruete ( at ) hotmail dot com ],
2007-01-09 20:23:44
#
-
working at home
[ Reply ]
I was having the same problem at home with 'CDO.Message'. I don't have my home computer set up as a server (which I believe was the problem) and when I used solution number 1, it worked! For sending the e-mail from the class I created, I used the following:
// send the mail SmtpMail.SmtpServer = "smtp.comcast.net"; SmtpMail.Send(mailMessage);
where, in my case, I use Comcast for e-mail and thus used their smtp in the line and where mailMessage is of type MailMessage.
I tried the SmtpMail.SmtpServer.Insert and, in my case, it did not work.
Allen [ ajbudz ( at ) comcast dot net ],
2007-01-11 11:40:46
#
-
The message could not be sent to smtp server
[ Reply ]
Hi Genius guys, I am getting an error as follows,
could not access CDO.Message object...
this error is occured only when i send attachments, and also some time it works fine even if there any attachments...
I am using Vb.Net 2003 Microsoft Office 2003 windows xp
plz help me to solve this problem.....
Thanks
suhail [ tv dot suhail ( at ) gmail dot com ],
2007-04-02 06:35:15
#
-
CDO.Message Error - Occurs,When attch files
[ Reply ]
Hi Genius guys, I am getting an error as follows,
could not access CDO.Message object...
this error is occured only when i send attachments, and also some time it works fine even if there any attachments...
I am using Vb.Net 2003 Microsoft Office 2003 windows xp
plz help me to solve this problem.....
Thanks
suhail [ tv dot suhail ( at ) gmail dot com ],
2007-04-02 06:36:43
#
-
CDO.Message Port 25 blocked
[ Reply ]
I have a VBScript that uses CDO to send e-mail. I originally was unsuccessful using CDO until I realized that the McAfee product that's installed blocked port 25. After disabling that port blocking my e-mail worked fine. But now, the software folks at work have pushed a new install to my workstation that does not allow me to disable the setting. Port 25 is now blocked again.
I tried adding my username, password to the .Item collection of the CDO object but I continue to get the same error. If port 25 is blocked, how can I use CDO to send e-mail?
Thanks in advance!
Here is my code snippet:
Public function sendemail(strSendTo,strCCTo,strSubject,strMessage)
'On Error Resume Next
' SEnd by connecting to port 25 of the SMTP server. Dim iMsg Dim iConf Dim Flds Dim strHTML Const cdoSendUsingPickup = 1 'Send message using the local SMTP service pickup directory. Const cdoSendUsingPort = 2 'Send the message using the network (SMTP over the network).
Const cdoAnonymous = 0 'Do not authenticate Const cdoBasic = 1 'basic (clear-text) authentication Const cdoNTLM = 2 'NTLM
set iMsg = CreateObject("CDO.Message") set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
' Set the CDOSYS configuration fields to use port 25 on the SMTP server.
With Flds .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "<my smtp server>" .Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic .Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 15 .Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "<myusername>" .Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "<mypassword>" .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False .Update End With
' Build HTML for message body. strHTML = "<HTML>" strHTML = strHTML & "<HEAD>" strHTML = strHTML & "<BODY>" strHTML = strHTML & strMessage & "</br>" strHTML = strHTML & "</BODY>" strHTML = strHTML & "</HTML>"
' Apply the settings to the message. With iMsg Set .Configuration = iConf .To = strSEndTo If isEmailValid(strCCTo) Then .Cc = strCCTo Else wscript.echo "Could not validate CC: e-mail address format" End If .Sender="<myusername@mydomain.com>" .From = "<myusername@mydomain.com>" .Subject = strSubject .HTMLBody = strHTML If isEmailValid(strSEndTo) Then .Send Else wscript.echo "Could not validate e-mail address format" End If End With
' Clean up variables. Set iMsg = Nothing Set iConf = Nothing Set Flds = Nothing
'MsgBox "Mail Sent!"
End function
Chris [ csuit_2000 ( at ) yahoo dot com ],
2007-08-07 10:58:45
#
-
Could not access 'CDO.Message' object
[ Reply ]
Whenever i'm sending mail to around 150 registered members of my site then it's throwing an error as mentioned in the "Subject" but sending mail to 40 to 50 registered members of my site then it's rocking.........
Manoj Bisht [ manoj dot msb1984 ( at ) gmail dot com ],
2007-09-19 22:45:29
#
-
Sending E-Mail with System.Web.Mail
[ Reply ]
My sendmail program which kicked by a window service was running on old 2000 server for several years. Recently it was moved to a new server which is 2003 server. It works fine with the server initial setting. Now it ran with error of "Could not access 'CDO.Message' object", but it still send a mail successfully if I run this sendmail program from command prompt. I would think that it is caused by system setting. But have no idea what kind of setting will screw up the system.web.mail in window service.
Thanks in advance for any idea and suggestions.
Helen
Helen [ hhe1 ( at ) jcpenney dot com ],
2007-10-30 07:05:09
#
-
Stupid stupid cause
[ Reply ]
Of all things! I went through and checked most items on this post only to discover that for whatever reason, the 'Pickup' directory in mailroot had vanished. A 'directory not found' error variety would have been nice instead of the CDO.message.
Dominic [ dominicvitrano ( at ) yahoo dot com ],
2007-11-27 23:37:52
#
-
CDO.NET Mail Error
[ Reply ]
Make sure to check if you have Virus Scanner software blocking your port and processes as well.
Chad [ chadwatson ( at ) smmoving dot com ],
2008-01-10 09:04:57
#
-
could not access cdo.message object
[ Reply ]
The mail sending successfully after i deleted my config file(app.config)instead I wrote all the parameters directly in my code.
teena [ teenamarysebatain ( at ) gmail dot com ],
2008-04-23 05:32:33
#
-
Could not access 'CDO.Message' object
[ Reply ]
Hi Dave,
your suggestion 6 did it:
SmtpMail.SmtpServer.Insert( 0, "MyServer")
instead of
SmtpMail.SmtpServer = "MyServer"
Thanks
RW [ rudy dot welvaert ( at ) cipkmo dot be ],
2008-06-23 01:06:17
#
-
Still problems...
[ Reply ]
My issue that the code runs in a seperate console app that my site fires up so that the external app which can take up to 30 min to process doesn't hold up the website. When i run the application manually the email sends fine but when the web application fires the application it gives me the "Could not access 'CDO.Message' object" message... any ideas?
steve [ stergiosjk ( at ) hotmail dot com ],
2008-09-30 00:05:07
#
-
CDO.Message
[ Reply ]
In my case, the suggestion number 6 did the trick. Very strange.
Bob Peterson [ sl_bob ( at ) hotmail dot com ],
2009-01-23 12:36:07
#
-
RE: CDO.Message
[ Reply ]
excellent yar i have same problem and i used u r piece of code it is working fine thanks mallikarjun
mallikarjun [ bachumalli ( at ) gmail dot com ],
2009-02-15 22:40:51
#
-
Could not access 'CDO.Message' object - another solution - duplicate
[ Reply ]
I build up my recipient list by iterating through a dataset. I tried suggestions 1 to 6 but none of them solved my problem.
I found it strange that even though I got the 'Could not access 'CDO.Message' object' exception my email was still being sent to all recipients.
Turns out that because a duplicate of a recipient email existed I got the 'Could not access 'CDO.Message' object' exception.
Thus ensure that no duplicates are in the recipient list either.
Gert Erasmus [ gerte23 ( at ) hotmail dot com ],
2009-02-16 10:56:31
#
-
In My case it was a permissions issue
[ Reply ]
In my case I got the "Could not access 'CDO.Message' object" message due to the fact that my application (which was windows service) was running under System account. Once I changed it to Administrator account it solved the issue
yaniv [ yaniv dot shoval ( at ) envitech dot co dot il ],
2009-04-26 06:41:02
#
-
Solved: VBScript "Could not access 'CDO.Message' object"
[ Reply ]
I ran into this issue for attachments larger than 4KB. I solved it doing the following under IIS 6: 1. Reregister cdosys.dll 2. Run FileMon 3. Found that w3wp.exe was trying to write to Windows\temp 4. Determined from IIS Manager that the user account for the Application Pool for the specific site was "Network Service". 5. Added Network Service to Security on the folder Windows\temp folder with Modify Rights (needs delete rights or folder starts filling up with tmp files)
Problem solved.
I would like to thank this site and other posters on the web with similar issues for providing the right clues to solve this.
Henry [ henry dot schlarb ( at ) onpath dot com ],
2009-11-25 18:35:07
#
-
Suggestion 4 InnerExceptions relaying
[ Reply ]
Great site dude!
On Suggestion 4, I've already searched Google. I've asked around and have still not found a solution that works for me for this extremely discouraging apparent bug in the SmtpMail class.
MailMessage message = new MailMessage(); // set params here SmtpMail.SmtpServer = "mail.myispmailserver.com"; SmtpMail.Send(message);
Its fine in console mode- but on my server no good?
From my ASP.NET application I get an error message in the subject line.
So Your suggestion for valid TO address and iterating through the InnerExceptions, I keep trying to send a test email.
Any more help?
<a href = "http://www.SQLVB.com">Data mining and Text mining with VB.NET. Visual Studio .NET .ADO.NET. Programming Services</a> <br> <a href = "http://www.DataVB.com">Hiring / VB.NET Jobs</a> <br> <a href = "http://www.Beginz.com">Domain Investor Needed</a> <br>
bob [ fokx ( at ) hotmail dot com ],
2009-12-12 08:07:50
#
-
The Scary "Could not access 'CDO.Message' object"
[ Reply ]
I encountered this dreaded error, and after trying nearly every solution presented here and at other sites, I still had not resolved the error.
I was trying to send out an html message, and would receive the following error info:
System.Web.HttpException: Could not access 'CDO.Message' object. ---> System.ArgumentException: Value does not fall within the expected range. at System.Web.Mail.LateBoundAccessHelper.SetProp(Type type, Object obj, String propName, Object propValue) at System.Web.Mail.LateBoundAccessHelper.SetProp(Object obj, String propName, Object propValue) --- End of inner exception stack trace --- at System.Web.Mail.LateBoundAccessHelper.SetProp(Object obj, String propName, Object propValue) at System.Web.Mail.CdoSysHelper.Send(MailMessage message) at System.Web.Mail.SmtpMail.Send(MailMessage message) ...
The error would occur when the message was being sent.
My Solution:
All it took was altering the data being passed to the message.body. I added a Cr + Lf to the beginning of my string prior to storing it in the message.body.
I don't know why this solution works. If anybody can explain it, I'd love to know why.
Paquero [ kc0bfq ( at ) hotmail dot com ],
2009-12-14 16:06:12
#
|