1. Send email with local SMTP installed:
Set objEmail = CreateObject("CDO.Message")
objEmail.From = "test1@test.com"
objEmail.To = "test2@test.com"
objEmail.Subject = "Testing"
objEmail.Textbody = "Testing..."
objEmail.Send
2. Send email without SMTP installed:
Set objEmail = CreateObject("CDO.Message")
objEmail.From = "test1@test.com"
objEmail.To = "test2@test.com"
objEmail.Subject = "Testing"
objEmail.Textbody = "Testing..."
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = _
"your smarthost"
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objEmail.Configuration.Fields.Update
objEmail.Send
Set objEmail = CreateObject("CDO.Message")
objEmail.From = "test1@test.com"
objEmail.To = "test2@test.com"
objEmail.Subject = "Testing"
objEmail.Textbody = "Testing..."
objEmail.Send
2. Send email without SMTP installed:
Set objEmail = CreateObject("CDO.Message")
objEmail.From = "test1@test.com"
objEmail.To = "test2@test.com"
objEmail.Subject = "Testing"
objEmail.Textbody = "Testing..."
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = _
"your smarthost"
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objEmail.Configuration.Fields.Update
objEmail.Send