Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi there I am using CDOSYS on Win XP pro to try and send mail through ASP.NET. I have a mailhandler class which encapsulates all the mail operations.

 

The problem is in the code below.

 

   Public Function SendTEstCDOMail()
       Dim om As New CDO.Message()
       Dim Flds As ADODB.Fields
       Flds = om.Configuration.Fields

       With Flds
           .Item(cdoSendUsingMethod) = cdoSendUsingPort
           .Item(cdoSMTPServerName) = "localhost"
           .Item(cdoSMTPConnectionTimeout) = 10 ' quick timeout
           .Update()
       End With
       om.From = "d1200199@qub.ac.uk"
       om.To = "d1200199@qub.ac.uk"
       om.Subject = "hello"
       om.TextBody = "anything"

       om.Fields.Update()
       om.Send()
   End Function

 

when I am wring the I get errors that the Name 'cdoSendUsingMethod' is not declared. and

Name 'cdoSendUsingPort' is not declared

and

Name 'cdoSMTPServerName' is not declared.

and

Name 'cdoSMTPConnectionTimeout' is not declared.

 

 

I have referenced CDOSYS in my projec tbut I canot understand why these are not being refernced correctly.

 

Any ideas?

 

Cheers

 

Peter

  • 3 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...