John, thanks for the reply, but the code requires that an Exchange
Server be set.
I found the following which might do the trick (my apologies for not
noting where I got this code):
________________________________________
Public Sub GetCDOParameters()
Dim strEnterprise As String, strSite As String, strServer As String
Dim strProfileInfo As String
Dim objRenderApp As Object
' Create renderer application
On Error Resume Next
Set objRenderApp = Server.CreateObject("AMHTML.Application")
' Pull configuration out of the registry
Err.Clear
On Error Resume Next
objRenderApp.LoadConfiguration 1, _
"HKEY_LOCAL_MACHINE\System\CurrentControlSet\Servi ces\MSExchangeWeb
\Parameters"
strEnterprise = objRenderApp.ConfigParameter("Enterprise")
strSite = objRenderApp.ConfigParameter("Site")
strServer = objRenderApp.ConfigParameter("Server")
' Construct CDO profile
strProfileInfo = "/o=" + strEnterprise + "/ou=" + strSite + _
"/cn=Configuration/cn=Servers/cn=" + strServer + vbLf + "anon" + vbLf
+ "anon"
' Create CDO session
Err.Clear
On Error Resume Next
Set objSession = Server.CreateObject("MAPI.Session")
' Logon with anonymous CDO profile
Err.Clear
On Error Resume Next
objSession.Logon "", "", False, True, 0, True, strProfileInfo
End Sub
________________________________________
I'm not even sure if I need all of this. Seems like strServer is what
I want. But I'm getting an error on:
Set objRenderApp = Server.CreateObject("AMHTML.Application")
on the Server word. I do have a reference to Microsoft CDO1.21 Library
set.
Any help is appreciated.
On Mar 7, 9:42 pm, John Mishefske <jmishefsk...@SPAMyahoo.comwrote:
rdemyanwrote:
I've added the ability to send e-mails from MyApp using CDO. I would
like to programatically get the name of the Microsoft Exchange Server.
Perhaps this works for you:
http://support.microsoft.com/kb/183917
--
'---------------
'John Mishefske
'---------------