I am having a problem with an ASP form. We use the form to send emails to clients through our support intranet. The form has a few fields and when it is submitted it should send an email to the client and copy us in as well as adding the form fields to the support intranet database.
It all works fine but now we want to merge a field from the database with the email body before it is sent.
I dont know how to pull these database fields in to the code for the email. Can anyone assist?
The field I am trying to add on to the end of the HTML email body is:
The recordset is called Users and the field is called HTMLSignature
Just to say that the code works fine EXCEPT for that i can't merge the contents of the HTMLSignature field with the emailBody variable....
the error i get is:
Microsoft VBScript runtime error '800a01a8'
Object required: ''
sp, line 73
Line 73 is the line starting emailBody=
emailSubject = "Support Incident: " & Request.Form("IncidentID") & " - " & Request.Form("IncidentTitle")
emailTo = Request.Form("emailTo")
emailBody = Request.Form("ActionDetail") & Users.Fields.Item("HTMLSignature").Value
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = emailSubject
objMessage.From = "Support @ Our Company<email@example.com>"
objMessage.To = emailTo
objMessage.HTMLBody = emailBody