Hi there,
I hope I'm not coming into this thread to late. I just ran into the same problem and here is the code I used to solve the problem. We are running W2003 ad server, so CDONTS isn't an option. I had to use CDO instead. Here is the code. It is air code, so forgive the breaks. Replace the xxx with the IP address of your SMTP server. You will also have to setup your SMTP server to allow relaying for those machines that will run your application. You can also do attachments, but I didn't include that in my code example.
Here is the link to a similar example but it uses the pickup directory instead. It works but all your users will need access to the pickup directory. That wasn't an option in our case...security you know.
http://support.microsoft.com/default...b;EN-US;286430
Sub Testing
Dim objCDOMail As Object
Dim objConf As Object
Const cdoSendUsingPort = 2
'This procedure e-mails the comment to the developer using CDO
Set objCDOMail = CreateObject("CDO.Message")
Set objConf = CreateObject("CDO.Configuration")
With objConf.Fields
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "xxx.xxx.xxx.xxx"
.Update
End With
With objCDOMail
Set .configuration = objConf
.To = "
[email protected]
.From = "
[email protected]
.bcc = "
[email protected]"
.Subject = "Testing"
.TextBody = "This is a test"
.Send
End with
Set objCDOMail = Nothing
Set objConf = Nothing
End Sub