Tom's Hardware > Forum > Windows 2000/NT > Windows 2000/NT General Discussion > Help please: 'could not create cdo.message object'

Help please: 'could not create cdo.message object'

Forum Windows 2000/NT : Windows 2000/NT General Discussion - Help please: 'could not create cdo.message object'

Tom's Hardware: Over 1.4 million members in 6 different countries available to answer all your high-tech questions. Sign up now! Its free!
Word :    Username :           
 

Archived from groups: microsoft.public.win2000.setup (More info?)

 

I am using the Mailmessage class in my VB app. to create and send an
email over SMTP...

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

Sponsored Links
Register or log in to remove.

Archived from groups: microsoft.public.win2000.setup (More info?)

 

Ask them in one of the programming groups.

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"JERRYB" wrote:
|I am using the Mailmessage class in my VB app. to create and send an
| email over SMTP...
|
| 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

Reply to Anonymous
Tom's Hardware > Forum > Windows 2000/NT > Windows 2000/NT General Discussion > Help please: 'could not create cdo.message object'
Go to:

There are 1150 identified and unidentified users. To see the list of identified users, Click here.

Please mind

You are about to answer a thread that has been inactive for more than 6 months.
If you still wish to proceed, please ensure that your posting is original and does not duplicate or overlap any prior responses to this thread.

Add a reply Cancel
Sponsored links
  • Ask the community now
  • Publish
Ad
They won a badge
Join us in greeting them