Hi ansata,
If you want to use CDO, first thing you have to know is the setup of SMTP server, first its address and ports, it can be ip (202.155.x.x) or servername (mail.something.com) or if it's in the same machine with webserver, we can just put "localhost". Ports usually use 25.
And next is the authentication, if your SMTP server needs an authentication to send email, your need to create account that you will use to send email and you will have to set the username and password when you want to send it.
here some simple example (using authentication):
Const cdoSendUsingPickup = 1
Const cdoSendUsingPort = 2
Const cdoAnonymous = 0
Const cdoBasic = 1
Const cdoNTLM = 2
Set objMessage = CreateObject("CDO.Message")
objMessage.From = """Your Name""<
[email protected]>"
objMessage.To = "
[email protected]"
objMessage.Subject = "An Email From Active Call Center."
objMessage.TextBody = _
"This is some sample message text.." & _
vbCRLF & _
"It was sent using SMTP authentication."
objMessage.AddAttachment("file://C:\Program Files\Active Call Center\Examples\Goodbye.wav")
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = _
cdoSendUsingPort
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = _
"smtp.YourServer.com" ' Or "mail.server.com"
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = _
cdoBasic
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusername") = _
"
[email protected]"
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendpassword") = _
"Password"
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = _
25
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = _
False
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = _
60
objMessage.Configuration.Fields.Update
objMessage.Send
Set objMessage = nothing
You can find more about sending email using CDO on
http://msdn.microsoft.com/library/en..._messaging.asp
Is it explain enough?
Regards,
Sherief C. Mursyidi