set objMessage = server.createobject("cdo.message")
set objConfig = server.createobject("cdo.configuration")
' Setting the SMTP Server
Set Flds = objConfig.Fields
Flds.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
Flds.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "min.smpt.server"
Flds.update
Set objMessage.Configuration = objConfig
objMessage.To = "olle@pelle.com"
objMessage.From = "pelle@olle.com"
objMessage.Subject = "This is a sample email sent using CDO"
objMessage.TextBody = "Congratulation" & VbCrLf & "If you receive this is, your mail component works"
objMessage.fields.update
objMessage.Send
set objMessage = nothing
set objConfig = nothing