Sponsored by
www.aspnetemail.com
|
 |
Discuss This FAQ Item
Got a question? Another Suggestion? Want to post your solution? Discuss it below.
-
CDO.Message "\n" mishandling
[ Reply ]
For whatever reason, when using code similar to the following:
text = System.Text.RegularExpressions.Regex.Replace(text, "<br>","\n")
msg.Body = text;
causes a CDO.Message problem.
Sending the message even to a *different* smtp server than the localhost, running something entirely different (linux), can cause a CDO.message problem. Why? I have no idea. But it's been confirmed on 6 different smtp servers, and on clients running XP and Server 2003.
Drew
Drew Crawford [ CompaqDrew ( at ) sbcglobal dot net ],
2004-08-11 16:00:21
#
-
RE: CDO.Message "\n" mishandling
[ Reply ]
Change
text = System.Text.RegularExpressions.Regex.Replace(text, "<br>","\n")
to
text = System.Text.RegularExpressions.Regex.Replace(text, "<br>","\r\n")
Cheers! Dave
dave wanta [ dave ( at ) 123aspx dot com ],
2004-08-11 16:11:17
#
-
RE RE: CDO.Message "\n" mishandling
[ Reply ]
my error is: 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 0x80040217. The server response was not available
leech [ leech125 ( at ) sohu dot com ],
2004-12-28 19:42:23
#
-
RE RE: CDO.Message "\n" mishandling
[ Reply ]
thank you for the insight!
I have been banging my head in frustration for hours. I would have never thought that "\n" would have caused such problems. Also, thank you for the post to work around the problem, using "\r\n"!
dbeard [ beardjem ( at ) charter dot net ],
2006-01-27 08:46:59
#
-
RE: CDO.Message "\n" mishandling
[ Reply ]
Mail
joao [ joao_mendes_7 ( at ) hotmail dot com ],
2005-03-16 04:25:03
#
-
It worked for me
[ Reply ]
This solution worked for me.
Sanjay [ skhattar ( at ) indusvalleypartners dot com ],
2004-11-15 18:24:30
#
-
What about Windows Forms?
[ Reply ]
I have the same problem, but in a windows form application, not a web app. Is it still the ASPNET account I have to worry about? Or something else?
Mark Weaver [ mark dot e dot weaver ( at ) mail dot sprint dot com ],
2005-03-10 14:12:03
#
-
Could not access 'CDO.Message' object asp.net
[ Reply ]
i am struggling with this error "Could not access 'CDO.Message'
I have tried most of the options given in this website for this error message but still no luck. I have to try 1 option enable port 25. can any one tell me how to enable it.
Please help me.......
saspath [ aspathi ( at ) gmail dot com ],
2005-08-25 15:31:38
#
-
Yeeeeeeeeeeeeees!!!
[ Reply ]
At last, the part of giving permissions to the temp directorio under Documents and Settings worked for me!...
Thank you so much
Guillermo [ dsadas ( at ) dasdas dot com ],
2005-11-02 07:32:00
#
-
'CDO.Message' Error Could be caused by...
[ Reply ]
This error message could be due to your attempted email could not have a proper Sender email address. Your sending address should be an authorized email in the SmtpServer you are using to send from. Unauthorized addresses and/or just using anything would not be allowed.
Tom [ tom ( at ) norra dot net ],
2006-03-30 07:28:13
#
-
Attachment Related error
[ Reply ]
When I tried to send mail without attachment it works fine. I also checked the suggestion given by Elizabeth. I have given full control to Temp folder. But then also I am getting the same error i.e. "Could not access 'CDO.Message' Object while sending mails with attachment. Please help me out with this problem.
JItendra Savale [ jitendra_savale ( at ) yahoo dot com ],
2006-04-11 20:56:23
#
-
Another "yeeeeeessssss"
[ Reply ]
I began trying every single solution given in this web, and the authorisation over ASPNET directory worked without a hiss. Thanks very much Elisabeth and all people efforts to enlighten us ... and Microsoft ;-)
Alvaro [ alvgon ( at ) auna dot com ],
2006-04-12 05:39:42
#
-
"Could not access 'CDO.Message' Object
[ Reply ]
I am using Windows XP and have Office 2003 installed. i tried downgrading Office but still no luck. I used the code in an ASP.NET webpage running on local machine and the email is sent. However, if I used the same code in VB.NET, I get the "Could not access 'CDO.Message' object.
I would appreciate some help as this is hampering my maintenance on a service that was previous written. I have tried many of the options and still no luck. Thanks
Hachenz [ hachenz ( at ) gmail dot com ],
2006-06-02 02:55:16
#
-
Could not access 'CDO.Message' object.
[ Reply ]
Hi, I have made dll that zips the files and sends MAIL using ASP .NET SMTP server class. My dll is working well with one application but I have problem in another. Could not access 'CDO.Message' object. fires when I use some attachment with the sending mail. Please help me out.
Dhaval Upadhyaya [ upadhyayadhaval ( at ) yahoo dot co dot in ],
2006-06-12 21:11:53
#
-
Could not access 'CDO.Message' object.
[ Reply ]
Hi, I have made dll that zips the files and sends MAIL using ASP .NET SMTP server class. My dll is working well with one application but I have problem in another. Could not access 'CDO.Message' object. fires when I use some attachment with the sending mail. Please help me out.
Dhaval Upadhyaya [ upadhyayadhaval ( at ) yahoo dot co dot in ],
2006-06-12 21:12:15
#
-
RE: Could not access 'CDO.Message' object.
[ Reply ]
I am getting this error in windows server 2003. Can anybody tell me where this asp.net user comes in windows server 2003? I have to grant this user.
nilesh [ nilesh_paladiya ( at ) yahoo dot com ],
2006-09-29 21:32:14
#
-
Yessssss again
[ Reply ]
Wonderful. I have a sneaking feeling that service packs or hotfixes reset the permissions on the local ASP.NET temporary directory; at least, I have an app. here that did work and now doesn't for no good reason.
I'm so glad that Microsoft re-wrote System.Web.Mail in ASP.NET 2.0, as System.Web.Mail is so thoroughly broken.
Elizabeth: kudos. However long did it take you to find this one??
Jeremy [ jeremy dot mcgee ( at ) bassettdata dot com ],
2006-10-21 12:33:21
#
-
Error handling attachments greater than 100k
[ Reply ]
ASP.NET 1.1 (VB) web app using system.web.mail to send emails having attachments of any possible size. The attached files are located on a network share and are called using the UNC path.
This method works fine for ALL files sizes when testing locally.
When on my test server, any attachment greater than 100k makes an error identical to the one descibed above.
Error: Path: /bu_scripts/5166/dms/DCNUpdate.aspx Message: Could not access 'CDO.Message' object. InnerException: 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) 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 DMS.CommonCode.SendEmail(String strSendTo, String strSendFrom, String strSubject, String strBody, Boolean bolHTML, String strAttachement) in c:\inetpub\wwwroot\xyz\Code.vb:line 378 Source: System.Web
Joseph [ jhuddle ( at ) kimball dot com ],
2006-11-22 13:42:12
#
-
My solution
[ Reply ]
I also had "Could not access 'CDO.Message' object" error (0x80000405?).
My solution to this problem was making sure every line of the body of email ended with CRLF. The body of email was generated from XSLT template and somehow it didn't have the correct line ending.
After fixing the line ending of the XSLT template, I had no problems with sending HTML email.
Takashi Yoshida [ tyoshida ( at ) mac dot com ],
2007-05-02 11:15:05
#
-
could not access cdo.message error only in debug
[ Reply ]
Hi,
I only have the error when I debug in my VB.NET-code. When I use my code on another pc with vb.net (which uses the same mailserver), the problem doesn't occur.
Also, if the program gets compiled on the other computer, and I run it on my computer, it works (so no lack of access on the smtpserver). However, if I compile the program (release), I keep getting the error.
I tried about every solution proposed here... no success yet. I keep searching.
Thomas Goemaere [ thomas dot goemaere ( at ) dekeyzer dot be ],
2007-05-03 01:10:40
#
-
RE: could not access cdo.message error only in debug
[ Reply ]
Hi all,
Can you try to access the smtp service in the server under the IIS?
Steps : 1) Click the properties of the "Default SMTP Virtual Server" 2) Click "Access" button 3) Click "Relay" and "Add" button 4) Under the Single computer IP address, put in 127.0.0.1 and click OK all the way. 5) Stop and start your Smtp services.
Try out!
Regards,
herman [ herman ( at ) has dot hitachi dot com dot sg ],
2007-06-29 01:04:21
#
-
test
[ Reply ]
test messasaage
SUNIL [ kamboj dot sunil ( at ) gmail dot com ],
2007-12-27 01:08:07
#
-
could not access cdo.message object
[ Reply ]
There should not be any space in from address and toaddress to be a valid address
teena [ teenamaryyy ( at ) gmail dot com ],
2008-04-29 23:12:54
#
|