Hello,
I've read a lot of threads on this subject, but they typically go back to a problem with the smtp server configuration. In my case, everything works great until I uncomment the one line below. Once I set the BodyFormat to MailFormat.Html then I get:
HttpException (0x80004005): Could not access 'CDO.Message' object
Otherwise, everything works fine and I get my html tags in plain text. I've got it working (in plain text) with my local smtp server (as below) and two ISP's... all throw the same error as soon as I set the format to HTML. The email addresses have, of course, been edited for the post.
Any ideas?
Thanks,
Michael
<CODE>
MailMessage m = new MailMessage();
m.To = "me@mydomain.co m";
m.From = “me@mydomain. com”;
m.Subject = "testing";
//m.BodyFormat = MailFormat.Html ;
m.Body = "this is my test email body.<br><b>thi s part is in bold</b>";
SmtpMail.SmtpSe rver = "localhost" ;
SmtpMail.Send(m );
</CODE> 1 2445
I just ran into the same issue (same message...same conditions).
Switching to text format allows mail to be sent. I suspect it is a
permission issue. I think the mailer is trying to build at least one
attachment to handle the HTML. I'm still investigating.
"Michael" <Mi*****@discus sions.microsoft .com> wrote in message news:<1B******* *************** ************@mi crosoft.com>... By the way, here's the full error:
[COMException (0x80040605): Unknown Error]
[TargetInvocatio nException: Exception has been thrown by the target of an invocation.] System.RuntimeT ype.InvokeDispM ethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters ) +0 System.RuntimeT ype.InvokeMembe r(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, ParameterModifi er[] modifiers, CultureInfo culture, String[] namedParameters ) +473 System.Type.Inv okeMember(Strin g name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args) +29 System.Web.Mail .LateBoundAcces sHelper.SetProp (Type type, Object obj, String propName, Object propValue) System.Web.Mail .LateBoundAcces sHelper.SetProp (Object obj, String propName, Object propValue)
[HttpException (0x80004005): Could not access 'CDO.Message' object.] System.Web.Mail .LateBoundAcces sHelper.SetProp (Object obj, String propName, Object propValue) System.Web.Mail .CdoSysHelper.S end(MailMessage message) System.Web.Mail .SmtpMail.Send( MailMessage message) tms1.mailtest.b tnGo_Click(Obje ct sender, EventArgs e) in mailtest.aspx.c s:64 System.Web.UI.W ebControls.Butt on.OnClick(Even tArgs e) System.Web.UI.W ebControls.Butt on.System.Web.U I.IPostBackEven tHandler.RaiseP ostBackEvent(St ring eventArgument) System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler sourceControl, String eventArgument) System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData) System.Web.UI.P age.ProcessRequ estMain()
_______________ _______________ _______________ _______________ ___
"Michael" wrote:
Hello,
I've read a lot of threads on this subject, but they typically go back to a problem with the smtp server configuration. In my case, everything works great until I uncomment the one line below. Once I set the BodyFormat to MailFormat.Html then I get:
HttpException (0x80004005): Could not access 'CDO.Message' object
Otherwise, everything works fine and I get my html tags in plain text. I've got it working (in plain text) with my local smtp server (as below) and two ISP's... all throw the same error as soon as I set the format to HTML. The email addresses have, of course, been edited for the post.
Any ideas? Thanks, Michael
<CODE>
MailMessage m = new MailMessage(); m.To = "me@mydomain.co m"; m.From = “me@mydomain. com”; m.Subject = "testing"; //m.BodyFormat = MailFormat.Html ; m.Body = "this is my test email body.<br><b>thi s part is in bold</b>"; SmtpMail.SmtpSe rver = "localhost" ; SmtpMail.Send(m );
</CODE> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Jimmy |
last post by:
I am trying to send an attachment using SmtpMail. I am
able to send an Excel or text file, but when I try to
send a pdf file, it throws an exception: could not access
CDO.Message object. The file size is about 1.92 MB. I was
wondering what could be the factors that result in such
an exception. I am using C# .Net and Windows XP Pro.
Thanks,
Jimmy
|
by: Kevin Spencer |
last post by:
We just moved an ASP.Net app to a Windows 2003 Server, and the SMTPMail
fails now with the following message:
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,
|
by: JJBW |
last post by:
Hi
I am having a bit of a problem with SmtpMail. I have a bit of code
that should send an email but when it is executed no email turns up.
MailMessage mmNotify = new MailMessage();
mmNotify.From = ;
mmNotify.To = ;
mmNotify.BodyFormat = MailFormat.Text;
|
by: ElanKathir |
last post by:
Hi !
I wrote one code for Send the E-mail, But that code have some problem , So please help me
Here i paste my code and Error:
Error:
Server Error in '/Elan_Sample' Application.
--------------------------------------------------------------------------------
|
by: Edward |
last post by:
Hello, everybody,
I tried to send Email out using ASP.NET, but failed, here is the code of sending:
--------------------------------------------------------------------------------
Try
Try
'SmtpMail.SmtpServer = "smtp.citiz.net"
| |
by: Jens Øster |
last post by:
Hi
I am writing a ASP.NET web application that must sent some e-mails.
I get the exception “Could not access 'CDO.Message' object” when I call SmtpMail.Send. This only happens when I send e-mail addresses out side my company walls. When the e-mail is send on some one in my company it works perfect.
I think it is a relay issue. Our system administrator will not allow relaying.
In the ASP.Net web.config file I let the web application...
|
by: Jens |
last post by:
Hi
I am writing a ASP.NET web application that must sent some e-mails.
I get the exception “Could not access 'CDO.Message' object” when I call SmtpMail.Send. This only happens when I send e-mail addresses out side my company walls. When the e-mail is send on some one in my company it works perfect.
I think it is a relay issue. Our system administrator will not allow relaying.
In the ASP.Net web.config file I let the web application...
|
by: Aren Cambre |
last post by:
Why does SmtpMail.Send throw an exception if the MailMessage's
BodyFormat = MailFormat.Html? I've searched all over the place and
cannot find a solution anywhere. I am running this on Windows XP SP2,
and IIS's SMTP and WWW servers are installed.
Here is the error trace:
System.Web.HttpException: Could not access 'CDO.Message' object. --->
System.Reflection.TargetInvocationException: Exception has been thrown
by the target of an...
|
by: Zean Smith |
last post by:
I have a SMTP server running on port 9025, but seems like this doesn't
work.
SmtpMail.SmtpServer = "192.168.34.15:9025";
SmtpMail.Send( mail );
I couldn't find any properties on SmtpMail let me configure the port number,
any idea?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |