J
Johnmichael Monteith
I am attempting to create an email (using CDONTS) from an IIS server that
will be in a format that Outlook will recognize as a potential calendar
entry that someone would accept or decline. If they accept, the entry would
be placed in their calendar.
I looked at the code behind one of these emails and try to copy the format
to make it work, but it is not working.
At the end of this email is some example code.
Any thoughts or ideas on how to make this work (or whether it is even
possible -- I assume it must be), would be wonderful.
Thank you so much!
jp
-----------
Dim objMail
Const cdoBodyFormatHTML = 0
Const cdoMailFormatMIME = 0
strHTMLOpen = "<HTML><HEAD></HEAD><BODY>" & _
"<object ID=""Application""
classid=""CLSID:0005555B-0000-0000-C000-000000000555""></object>"
strHTMLClose = "</FONT></BODY></HTML>"
strScript = "<script language=vbcript>" & vbCrlF & _
"On Error Resume Next" & vbCrlF & _
"Set ApptItem = Application.CreateItem(1)" & vbCrlF & _
"ApptItem.BusyStatus = 0" & vbCrlF & _
"ApptItem.Recipients.Add (""Dummy Account"")" & vbCrlF & _
"ApptItem.Subject = ""Action Item Due""" & vbCrlF & _
"ApptItem.StartTime=""#01/01/05 1:00 PM#""" & vbCrlF & _
"ApptItem.Duration = 30" & vbCrlF & _
"ApptItem.Save" & vbCrlF & _
"</script>"
Err.Clear
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.From=Trim(Request.Form("Email"))
objMail.To=strEmailContact
objMail.Subject="Testing"
objMail.BodyFormat = cdoBodyFormatHTML
objMail.MailFormat = cdoMailFormatMIME
objMail.Body= strScript & strHTMLOpen & Trim(Request.Form("Comments")) &
strHTMLClose
objMail.Send
Set objMail = Nothing
If Err.Number <> 0 Then
Response.Write Err.Description
Response.End
End If%>
will be in a format that Outlook will recognize as a potential calendar
entry that someone would accept or decline. If they accept, the entry would
be placed in their calendar.
I looked at the code behind one of these emails and try to copy the format
to make it work, but it is not working.
At the end of this email is some example code.
Any thoughts or ideas on how to make this work (or whether it is even
possible -- I assume it must be), would be wonderful.
Thank you so much!
jp
-----------
Dim objMail
Const cdoBodyFormatHTML = 0
Const cdoMailFormatMIME = 0
strHTMLOpen = "<HTML><HEAD></HEAD><BODY>" & _
"<object ID=""Application""
classid=""CLSID:0005555B-0000-0000-C000-000000000555""></object>"
strHTMLClose = "</FONT></BODY></HTML>"
strScript = "<script language=vbcript>" & vbCrlF & _
"On Error Resume Next" & vbCrlF & _
"Set ApptItem = Application.CreateItem(1)" & vbCrlF & _
"ApptItem.BusyStatus = 0" & vbCrlF & _
"ApptItem.Recipients.Add (""Dummy Account"")" & vbCrlF & _
"ApptItem.Subject = ""Action Item Due""" & vbCrlF & _
"ApptItem.StartTime=""#01/01/05 1:00 PM#""" & vbCrlF & _
"ApptItem.Duration = 30" & vbCrlF & _
"ApptItem.Save" & vbCrlF & _
"</script>"
Err.Clear
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.From=Trim(Request.Form("Email"))
objMail.To=strEmailContact
objMail.Subject="Testing"
objMail.BodyFormat = cdoBodyFormatHTML
objMail.MailFormat = cdoMailFormatMIME
objMail.Body= strScript & strHTMLOpen & Trim(Request.Form("Comments")) &
strHTMLClose
objMail.Send
Set objMail = Nothing
If Err.Number <> 0 Then
Response.Write Err.Description
Response.End
End If%>