I am using CDOSYS in vb trying to create an email program Can anyone tell me what I'm doing wrong?
------snippit--------
Dim NewMsg As New CDO.Message()
Dim Config As New CDO.Configuration()
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim NewMsg As New CDO.Message()
Dim Config As New CDO.Configuration()
Config.Fields(cdoSendUsingMethod) = cdoSendusingport
Config.Fields(cdosmtpserver) = CStr(TextBox2.Text)
Config.Fields(cdosmtpserverport) = 25
Config.Fields(cdosmtpauthenticate) = cdoBasic
Config.Fields(cdoseenuserName) = "username"
Config.Fields(cdoseenuserpassword) = "password"
NewMsg.To = CStr(Reciver.Text)
NewMsg.Subject = CStr(Subject.Text)
------end snippit-----
The error I get is that "cdoSendUsingMethod" and so on, are not declared
if I move them above the sub then config has the error declaration expected.
Please help
Thank's in advance!
------snippit--------
Dim NewMsg As New CDO.Message()
Dim Config As New CDO.Configuration()
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim NewMsg As New CDO.Message()
Dim Config As New CDO.Configuration()
Config.Fields(cdoSendUsingMethod) = cdoSendusingport
Config.Fields(cdosmtpserver) = CStr(TextBox2.Text)
Config.Fields(cdosmtpserverport) = 25
Config.Fields(cdosmtpauthenticate) = cdoBasic
Config.Fields(cdoseenuserName) = "username"
Config.Fields(cdoseenuserpassword) = "password"
NewMsg.To = CStr(Reciver.Text)
NewMsg.Subject = CStr(Subject.Text)
------end snippit-----
The error I get is that "cdoSendUsingMethod" and so on, are not declared
if I move them above the sub then config has the error declaration expected.
Please help
Thank's in advance!