473,396 Members | 1,916 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

E-Mailing From A Console App

EdB
I have the following Code in a Windows App (reference to System.Web.dll)

Dim Message As System.Web.Mail.MailMessage = New System.Web.Mail.MailMessage()
Dim smtpmail As System.Web.Mail.SmtpMail
smtpmail.SmtpServer = "129.41.70.10"

'strOrderInfo = BuildBody()

Message.To = "ed****@beavex.com"
Message.From = "te**@beavex.com"
Message.Body = "Testing"
Message.Subject = "Hope This Works"

Try
smtpmail.Send(Message)
Catch ex As Exception
Dim s As String = ex.Message
End Try

It works fine in a Windows App. In My ConsoleApp, I'm catching an error

_message "Could not access 'CDO.Message' object." String

Any help here. The code is the exact same.

Ed
Nov 20 '05 #1
3 964
EdB
Sorry for the double post....the forum informed me that the first one failed.

"EdB" wrote:
I have the following Code in a Windows App (reference to System.Web.dll)

Dim Message As System.Web.Mail.MailMessage = New System.Web.Mail.MailMessage()
Dim smtpmail As System.Web.Mail.SmtpMail
smtpmail.SmtpServer = "129.41.70.10"

'strOrderInfo = BuildBody()

Message.To = "ed****@beavex.com"
Message.From = "te**@beavex.com"
Message.Body = "Testing"
Message.Subject = "Hope This Works"

Try
smtpmail.Send(Message)
Catch ex As Exception
Dim s As String = ex.Message
End Try

It works fine in a Windows App. In My ConsoleApp, I'm catching an error

_message "Could not access 'CDO.Message' object." String

Any help here. The code is the exact same.

Ed

Nov 20 '05 #2
Hi Ed,

Google is full of answers to the dreaded 'cdo message object'. I've got to
think that the .net framework has a bug or 2 here, but I've found that I
overcome this error in a console app using localhost as 127.0.0.1 instead as
the smtpserver.

HTH,

Bernie Yaeger

"EdB" <Ed*@discussions.microsoft.com> wrote in message
news:D6**********************************@microsof t.com...
I have the following Code in a Windows App (reference to System.Web.dll)

Dim Message As System.Web.Mail.MailMessage = New System.Web.Mail.MailMessage() Dim smtpmail As System.Web.Mail.SmtpMail
smtpmail.SmtpServer = "129.41.70.10"

'strOrderInfo = BuildBody()

Message.To = "ed****@beavex.com"
Message.From = "te**@beavex.com"
Message.Body = "Testing"
Message.Subject = "Hope This Works"

Try
smtpmail.Send(Message)
Catch ex As Exception
Dim s As String = ex.Message
End Try

It works fine in a Windows App. In My ConsoleApp, I'm catching an error

_message "Could not access 'CDO.Message' object." String

Any help here. The code is the exact same.

Ed

Nov 20 '05 #3
EdB
Thanks, but not for me, I still have the same error.

"Bernie Yaeger" wrote:
Hi Ed,

Google is full of answers to the dreaded 'cdo message object'. I've got to
think that the .net framework has a bug or 2 here, but I've found that I
overcome this error in a console app using localhost as 127.0.0.1 instead as
the smtpserver.

HTH,

Bernie Yaeger

"EdB" <Ed*@discussions.microsoft.com> wrote in message
news:D6**********************************@microsof t.com...
I have the following Code in a Windows App (reference to System.Web.dll)

Dim Message As System.Web.Mail.MailMessage = New

System.Web.Mail.MailMessage()
Dim smtpmail As System.Web.Mail.SmtpMail
smtpmail.SmtpServer = "129.41.70.10"

'strOrderInfo = BuildBody()

Message.To = "ed****@beavex.com"
Message.From = "te**@beavex.com"
Message.Body = "Testing"
Message.Subject = "Hope This Works"

Try
smtpmail.Send(Message)
Catch ex As Exception
Dim s As String = ex.Message
End Try

It works fine in a Windows App. In My ConsoleApp, I'm catching an error

_message "Could not access 'CDO.Message' object." String

Any help here. The code is the exact same.

Ed


Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jonathan M. Rose | last post by:
I am looking for a script that I can sit on an HTML server (Linux, Apache, PHP/Perl/Python/Etc.) that will allow me to do the following things: 1) Post news articles that consists of (i) a title...
2
by: Paul Hudson | last post by:
Ive developed a web based system where somebody can add a news record using ASP and MS Access database connectivity. The new record is inserted into the database and then a formatted email gets...
0
by: Chuck | last post by:
Good Morning: Has anyone in this newsgroup had experience with emailing changes made on a xml datagrid using ASPEmail? I currently have the table loading correctly with the correct data. When I...
0
by: Steven Scaife | last post by:
There seems to be a problem with my emailing code, although during testing it worked fine. What happens is it sends two emails instead of one, and also doesn't put any text in the email for some...
1
by: Stanley Cheung | last post by:
Hi all, I am developing the application for send emailing list, actually, i can perform to send a email 1 by 1 and do it on aspx page. I have a enquiry that how can the application change to...
3
by: tafs7 | last post by:
My code below is supposed to email me when an error occurs on the application, but it's not emailing anything. Am I missing something? I know the smtp servers I've tried work. I even added a...
4
by: Mike Moore | last post by:
What is the best way to launch outlook from an asp.net web page? Can you do this using MAPI or is there a control that you can purchase? We are unable to use SMTP. We use MS Exhange and MAPI...
1
by: hazz | last post by:
I tried using the Visual Studio setup and deployment wizard to create an msi to install the .exe, config and .dll resource files from my winxp deve box onto a Windows 2003 server. I don't have...
2
by: Tim Hunter | last post by:
I have two questions regarding emailing from Access. My first question relates to how many email addresses is too much. I have a client who wants to email 1500 people at once. Is this possible or...
20
by: paul814 | last post by:
I've been working on this for some time now and have gotten nowhere...hoping someone here can help. I want to take and email all records in a database for the current date when this php page is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
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...
0
Oralloy
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,...
0
jinu1996
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...
0
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.