Set cdoConfig = CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = " <enter_mail.server_here>"
.Item(cdoSMTPAuthenticate) = 1
.Item(cdoSendUsername) = " <enter_username_here>"
.Item(cdoSendPassword) = " <enter_password_here>"
.Update
End With
Set cdoMessage = CreateObject("CDO.Message")
With cdoMessage
Set .Configuration = cdoConfig
.From = "from@me.com"
.To = "to@me.com"
.Subject = "Sample CDO Message"
.TextBody = "This is a test for CDO.message"
.Send
End With