Yeni serverlarda artık CDONTS yerine CDOSYS kullanılıyor. CDONTS'un yeni versiyonu. Ona da hala CDONTS diye hitap ediyorlar. Aşağıda CDOSYS için örnek kullanım gönderdim. Gerekli ayarları kendine göre düzenle ve kullan. Microsoftla ilgili olan yere dokunmuyorsun.

Dim Subject, Body, SenderEmail, RecipientEmail, SMTPServer, SMTPusername, SMTPpassword

SenderEmail = "me@mydomain.tld"
RecipientEmail= "someone@somedomain.tld"
SMTPserver = "mail.mydomain.tld"
SMTPusername = "me@mydomain.tld"
SMTPpassword = "mypassword"

Subject = "Hello"
Body = "This is a test. Please ignore."


sch = "http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig = CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(sch & "sendusing") = 2
.Item(sch & "smtpserver") = SMTPserver
.Item(sch & "smtpserverport") = 587
.Item(sch & "smtpauthenticate") = 1
.Item(sch & "sendusername") = SMTPusername
.Item(sch & "sendpassword") = SMTPpassword
.Item(sch & "smtpusessl") = False
.Item(sch & "connectiontimeout") = 100
.update
End With
Const cdoSendUsingPickup = "c:\inetpub\mailroot\pickup"
Set cdoMessage = CreateObject("CDO.Message")
With cdoMessage
Set .Configuration = cdoConfig
cdoMessage.From = SenderEmail
cdoMessage.To = RecipientEmail
cdoMessage.Subject = Subject
cdoMessage.TextBody = Body
cdoMessage.Send
End With
Set cdoMessage = Nothing
Set cdoConfig = Nothing