By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,041 Members | 1,056 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,041 IT Pros & Developers. It's quick & easy.

MailMessage class and CDO

P: n/a
I am using the Mailmessage class in my VB app,

Everything works fine on my WinXP development box but when I run the app on
Windows 2000 server it fails with "could not create cdo.message object"

Please help, my code is below and like I said it works fine on my XP machine:
(to,cc,subject and from are passed to the sub)

Dim strHTML As String
Dim newmsg As New MailMessage

newmsg.BodyFormat = MailFormat.Text

newmsg.To = strTo
newmsg.Cc = strCC
newmsg.From = strFrom
newmsg.Subject = Subject

newmsg.Body = Body & vbNewLine & vbNewLine & vbNewLine & vbNewLine &
vbNewLine & vbNewLine & _
" ** This is an automatically generated email, please do not attempt to send
a reply."

Try
SmtpMail.SmtpServer = "12.4.50.228"

SmtpMail.Send(newmsg)

Catch ex As Exception
AddLog("Email send error @ " & DateTime.Now())
AddLog("Error was: " & ex.Message)
Exit Sub
End Try

Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
* =?Utf-8?B?SmVycnli?= <Je****@discussions.microsoft.com> scripsit:
Everything works fine on my WinXP development box but when I run the app on
Windows 2000 server it fails with "could not create cdo.message object"


Did you already take a look at the FAQ:

<URL:http://www.systemwebmail.net/>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #2

P: n/a
* =?Utf-8?B?SmVycnli?= <Je****@discussions.microsoft.com> scripsit:
Thanks for the FAQ but I still don't see anything that might explain my
problem... any ideas?


So, you read everything in the
<URL:http://www.systemwebmail.net/faq/4.2.aspx> section?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.