Help useing cdosys!

swhxswt

Newcomer
Joined
May 5, 2004
Messages
1
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!
 
System.Web.Mail

Check this one to send email. Lot of thread on sending email.
Receiving... look on C# Corner. There's a lot there in the Internet Section that could help you.
 
Back
Top