I have a VB.Net service that I'm trying to send e-mail from. Below is my
code:
Dim MessageProcessi ng As New SageQuestMailer
SendMailMessage (EmailAddresses )
Function SendMailMessage (ByVal EmailAddresses)
Dim ToAddress As String = "lb***@sage-quest.com"
Dim FromAddress As String = "SageQuest Alert Processor"
Dim Subject As String = "Alert Message"
Dim TextMessage As String = "This is a Canned Alert for Testing"
MessageProcessi ng.SendMail(ToA ddress, FromAddress, Subject,
TextMessage)
End Function
Public Class SageQuestMailer
Inherits System.Componen tModel.Componen t
Public Function SendMail(ByVal ToAddress, ByVal FromAddress, ByVal
Subject, ByVal TextMessage)
Try
Dim MailMessage As MailMessage = New MailMessage
Dim OutboundSMTP As SmtpMail
OutboundSMTP.Sm tpServer = "sage-quest.com"
MailMessage.To = ToAddress
MailMessage.Fro m = FromAddress
MailMessage.Sub ject = Subject
MailMessage.Bod y = TextMessage
OutboundSMTP.Se nd(MailMessage)
Catch ex As Exception
End Try
End Function
When I execute the above function I get the following exception:
Could Not Access 'CDO.Message' object.
What am I missing here? I've added the "COM" refrences to my project and
also "ActiveX Data objects" as well.
Nothing seems to help here. Again What am I missing here.
Thanks 3 3072
I do have the imports for mail please see below:
Imports System.Web.Mail
"Larry Bird" wrote: I have a VB.Net service that I'm trying to send e-mail from. Below is my code:
Dim MessageProcessi ng As New SageQuestMailer
SendMailMessage (EmailAddresses )
Function SendMailMessage (ByVal EmailAddresses)
Dim ToAddress As String = "lb***@sage-quest.com" Dim FromAddress As String = "SageQuest Alert Processor" Dim Subject As String = "Alert Message" Dim TextMessage As String = "This is a Canned Alert for Testing"
MessageProcessi ng.SendMail(ToA ddress, FromAddress, Subject, TextMessage)
End Function
Public Class SageQuestMailer Inherits System.Componen tModel.Componen t
Public Function SendMail(ByVal ToAddress, ByVal FromAddress, ByVal Subject, ByVal TextMessage) Try
Dim MailMessage As MailMessage = New MailMessage Dim OutboundSMTP As SmtpMail
OutboundSMTP.Sm tpServer = "sage-quest.com" MailMessage.To = ToAddress MailMessage.Fro m = FromAddress MailMessage.Sub ject = Subject MailMessage.Bod y = TextMessage
OutboundSMTP.Se nd(MailMessage)
Catch ex As Exception
End Try
End Function
When I execute the above function I get the following exception:
Could Not Access 'CDO.Message' object.
What am I missing here? I've added the "COM" refrences to my project and also "ActiveX Data objects" as well.
Nothing seems to help here. Again What am I missing here.
Thanks
Larry,
It sounds like you don't have CDONTS or CDOSYS installed on your computer.
CDONTS & CDOSYS are OS dependant.
The following site provides a wealth of information on System.Web.Mail . http://www.systemwebmail.net/
Topic 4.2.3 starts discussing your message. http://www.systemwebmail.net/faq/4.2.3.aspx
Hope this helps
Jay
"Larry Bird" <La*******@disc ussions.microso ft.com> wrote in message
news:0B******** *************** ***********@mic rosoft.com... I have a VB.Net service that I'm trying to send e-mail from. Below is my code:
Dim MessageProcessi ng As New SageQuestMailer
SendMailMessage (EmailAddresses )
Function SendMailMessage (ByVal EmailAddresses)
Dim ToAddress As String = "lb***@sage-quest.com" Dim FromAddress As String = "SageQuest Alert Processor" Dim Subject As String = "Alert Message" Dim TextMessage As String = "This is a Canned Alert for Testing"
MessageProcessi ng.SendMail(ToA ddress, FromAddress, Subject, TextMessage)
End Function
Public Class SageQuestMailer Inherits System.Componen tModel.Componen t
Public Function SendMail(ByVal ToAddress, ByVal FromAddress, ByVal Subject, ByVal TextMessage) Try
Dim MailMessage As MailMessage = New MailMessage Dim OutboundSMTP As SmtpMail
OutboundSMTP.Sm tpServer = "sage-quest.com" MailMessage.To = ToAddress MailMessage.Fro m = FromAddress MailMessage.Sub ject = Subject MailMessage.Bod y = TextMessage
OutboundSMTP.Se nd(MailMessage)
Catch ex As Exception
End Try
End Function
When I execute the above function I get the following exception:
Could Not Access 'CDO.Message' object.
What am I missing here? I've added the "COM" refrences to my project and also "ActiveX Data objects" as well.
Nothing seems to help here. Again What am I missing here.
Thanks
Hi Larry,
Go to google and put in 'could not access cdo message' - you will find that
this is the biggest headache in vb .net re email and all kinds of ideas that
may be causing the problem.
HTH,
Bernie Yaeger
PS - how's the jump shot, these days?
"Larry Bird" <La*******@disc ussions.microso ft.com> wrote in message
news:0B******** *************** ***********@mic rosoft.com... I have a VB.Net service that I'm trying to send e-mail from. Below is my code:
Dim MessageProcessi ng As New SageQuestMailer
SendMailMessage (EmailAddresses )
Function SendMailMessage (ByVal EmailAddresses)
Dim ToAddress As String = "lb***@sage-quest.com" Dim FromAddress As String = "SageQuest Alert Processor" Dim Subject As String = "Alert Message" Dim TextMessage As String = "This is a Canned Alert for Testing"
MessageProcessi ng.SendMail(ToA ddress, FromAddress, Subject, TextMessage)
End Function
Public Class SageQuestMailer Inherits System.Componen tModel.Componen t
Public Function SendMail(ByVal ToAddress, ByVal FromAddress, ByVal Subject, ByVal TextMessage) Try
Dim MailMessage As MailMessage = New MailMessage Dim OutboundSMTP As SmtpMail
OutboundSMTP.Sm tpServer = "sage-quest.com" MailMessage.To = ToAddress MailMessage.Fro m = FromAddress MailMessage.Sub ject = Subject MailMessage.Bod y = TextMessage
OutboundSMTP.Se nd(MailMessage)
Catch ex As Exception
End Try
End Function
When I execute the above function I get the following exception:
Could Not Access 'CDO.Message' object.
What am I missing here? I've added the "COM" refrences to my project and also "ActiveX Data objects" as well.
Nothing seems to help here. Again What am I missing here.
Thanks
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Cameron Eckman |
last post by:
I get various errors when I try to use email on the machine I have. XP
professional. It works fine on another machine with NT 2000 server. Below
is the code:
'BEGIN CODE
Dim oMail As New MailMessage()
With oMail
.From = "mypc@baxglobal.com"
.To = "ceckman@baxglobal.com"
|
by: michi |
last post by:
Hi there....
Got here a tricky thing with my SMTP.
First I show you what works on my machine..
**This Works**
SmtpMail.SmtpServer = "mail.gmx.net" <-gmx is my mail
provider
SmtpMail.Send"mymail@gmx.net", "somebody@xxx.ch", "sub",
|
by: Erwan |
last post by:
I have a strange (but very blocking) result when using the smtpmail
class from an ASPX page :
here is the (very simple !) code...
'--------------------------------------------------
mail.To = "el@illico.fr"
mail.From = "el@illico.fr"
mail.Subject = "test envoi de mail"
mail.Body = "test envoi de mail"
|
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: Gerard |
last post by:
Hello
I have created a windows service to monitor a database, it starts some
checks when a timer elapses. The checks send emails depending on their
findings. My issue is that when I created a windows application it
worked fine, however I need to use a service as I don't want to rely
on a user being logged in. The errors I get are:
Index #:System.Web.HttpException: Could not access 'CDO.Message'
object. --->...
|
by: Ryan |
last post by:
Hi,
I receive an access denied error (see below) when attempting to send an
email with BodyFormat=MailFormat.Html from an asp.net page. Exactly the same
code works fine in a console application, and also succeeds from the asp.net
page with BodyFormat=MailFormat.Text.
I've recently upgraded from W2K SP4 to WinXP SP2 and am using .Net Framework
v1.1 SP1. The code worked fine under W2K SP4.
|
by: Professor Yonce |
last post by:
I have made form for E-Mail. I have entered code but the Import system does
not work. It has squiggly line underneath it showing it is not communicating.
It Will not build.
Public Class Form3Bio1
System.Net.Mail.SmtpClient
Imports System.Net.Mail ' This line before ' does not work.
I have the rest of code to try if and when I am able to get System working.
' I XXX out certain entrys below just for this publication.
|
by: Tony M |
last post by:
VS 2005 - XP media - VB .net - winforms - .net 2.0
Just trying to send an email, here is the code and the error message that I
get. I can't figure out how to fix it?
|
by: pat |
last post by:
Hi,
i'am using an ac2K progrom which sends automaticle emails with an
attachment.
Since last week , a error occurs with number 2293. Our mail program is
Outlook 2003.
It's probably a matter of safety in outlook, but i didn't saw an answer to
prevent this error on theweb.
Where can i configure the safetyitem that Outlook sees the mail not langer
|
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: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
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...
| |