Basicly I have an online survey form. The user sumbits the form and the data is saved into a database.
The department that gets the results would like a PDF version of the form or an HTML email that is the exact form but filed out.
Does anyone have any ideas on how to acomplish this. I was thinking using the "objXmlHttp" to request the page and use html it returns as the body of me email. I tried creating a simple page to send the google HTML but with no luck. Something like this.
The department that gets the results would like a PDF version of the form or an HTML email that is the exact form but filed out.
Does anyone have any ideas on how to acomplish this. I was thinking using the "objXmlHttp" to request the page and use html it returns as the body of me email. I tried creating a simple page to send the google HTML but with no luck. Something like this.
Code:
<%
Dim objXmlHttp
Dim strHTML
' This is the server safe version from MSXML3.
Set objXmlHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")
objXmlHttp.open "GET", "[URL unfurl="true"]http://www.google.com",[/URL] False
objXmlHttp.send
strHTML = objXmlHttp.responseText
Set objXmlHttp = Nothing
Set oMail = Server.CreateObject("CDO.Message")
Set oMailConfig = Server.CreateObject ("CDO.Configuration")
oMailConfig.Fields("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/smtpserver")[/URL] = "mail.domain.com"
oMailConfig.Fields("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/smtpserverport")[/URL] = 25
oMailConfig.Fields("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/sendusing")[/URL] = 2
oMailConfig.Fields("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout")[/URL] = 60
oMailConfig.Fields.Update
Set oMail.Configuration = oMailConfig
oMail.From = "test@test.com"
oMail.To = "test@test.com"
oMail.Subject = "TEST"
oMail.HTMLBody = strHTML
oMail.Send
Set oMail = Nothing
Set oMailConfig = Nothing
response.write strHTML
%>