Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using CDOSYS when AD has exchange for email

Status
Not open for further replies.

VBVines

MIS
Jun 11, 1999
98
US
I have a helpdesk asp form that invites our users to quickly point and click issues that they may be having and quickly exit the little app/utility. I would like to add an email component to this asp app so I can be informed when a user sends an issue. I tried to configure smtp on our IIS 6.0 Server as a virtual smtp server but this the CDOSYS code in the app still didn't work. I am in an environment that has Active Directory with Exchange servers providing the backend for the Outlook 2003 client that is on everyones pc. Can anyone tell me if there is a way that I need to configure my IIS server to be able to communicate with the exchange servers so that I can configure CDO. Or is there another way to provide an email component to this app that someone can think of. Does anyone know if the vbsendmail.dll will work with asp?

aspvbwannab
 
I've not experienced this problem myself, but from what I've read, you shouldn't have to make any configuration changes.

Instead of using CDOSYS, just use CDO. CDOSYS is for Windows 2000.

[monkey][snake] <.
 
Do something like this except use your exchange server's IP address as seen from the web server.
Code:
Dim objMsg
Dim objConf

Set objMsg = Server.CreateObject("CDO.Message")
Set objConf = objMsg.Configuration

'set fields of the config object to send by using SMTP through port 25
With objConf.Fields
  .Item ("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/smtpserverport")[/URL] = 25 'SMTP port
  .Item("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/sendusing")[/URL] = 2  'cdoSendUsingPort
  .Item("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/smtpserver")[/URL] = "[red]127.0.0.1[/red]"
  .Update
End With
        
With objMsg
  .To = "blah@blah.com"
  .CC = "blah@blah.com"
  .ReplyTo = "blah@blah.com"
  .From = "blah@blah.com"
  .Subject = "Test CDO Message"
  .TextBody = "This is your test message."
  .Send
End With
          
Set objMsg = Nothing
Set objConf = Nothing

Also use real email addresses instead of blah@blah.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top