TheVillageIdiot27
Programmer
I am having trouble creating a CDO Appointment in ASP and am wondering if anyone has any template code?
So far I have rather cobelled together the following from my stock CDO mail code and the scant pickings I have found on the web, but I think I am a long way off something which works....
Any help gratefully appreciated.
So far I have rather cobelled together the following from my stock CDO mail code and the scant pickings I have found on the web, but I think I am a long way off something which works....
Code:
Const cdoSendUsingPort = 2
Const cdoBasic = 1
Set objAppointment = Server.CreateObject("CDO.Appointment")
Set objConf = Server.CreateObject("CDO.Configuration")
Set objFlds = objConf.Fields
With objFlds
.Item("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/sendusing")[/URL] = cdoSendUsingPort
.Item("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/smtpserver")[/URL] = "EXCHANGESERVER"
.Item("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/smtpauthenticate")[/URL] = cdoBasic
.Item("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/sendusername")[/URL] = "USERNAME"
.Item("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/sendpassword")[/URL] = "PASSWORD"
.Update
End With
With objAppointment
Set .Configuration = objConf
.StartTime = "02/02/2007 2:00:00 PM"
.EndTime = "02/02/2007 3:00:00 PM"
.Subject = "My Message Subject"
.Location = "Meeting Room 1"
.TextBody = "My Meeting Room Text"
.Attendees.Add("me@domain.co.uk")
End With
objAppointment.CreateRequest
Any help gratefully appreciated.