Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error sen email in VB6

Status
Not open for further replies.

hoabattu7641

Programmer
Jun 26, 2013
1
Hi everybody!

I have created a project that sends e-mail functionality using VB6. Previously the program runs smoothly. Recent program error "Runtime error 429. Active X component can't create object."

This is mycode:

Private Sub Command1_Click()
Dim Flds
Dim iMsg As New CDO.Message
Dim iConf As New CDO.Configuration
Set Flds = iConf.Fields

schema = "Flds.Item(schema & "sendusing") = cdoSendUsingPort
Flds.Item(schema & "smtpserver") = "smtp.gmail.com"
Flds.Item(schema & "smtpserverport") = 25
Flds.Item(schema & "smtpauthenticate") = 1
Flds.Item(schema & "sendusername") = "******@gmail.com"
Flds.Item(schema & "sendpassword") = "*****"
Flds.Item(schema & "smtpusessl") = 1
Flds.Update

With iMsg
.To = "autocar.hanoi@gmail.com"
.From = "*****@gmail.com" '
.Subject = "ODER FROM"
.HTMLBody = "Hello, This is a Test Mail"

Set .Configuration = iConf
.Send
End With
MsgBox "The End"
End Sub
 
See if anything here helps (ignore the fact that the example code is not for VB6; it is irrelevant).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top