danblack30
MIS
I'm using this code to send an email when a ticket is placed, except objMessage.TO was my email address. I can't seem to get a variable to work in that line.
<%
If Request.Form("submit").Count > 0 Then
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "TSR Form"
objMessage.Sender = "Martin_Door_Intranet"
objMessage.To = <%=(Recordset1.Fields.Item(emailaddress).Value)%>
objMessage.TextBody = "This TSR was logged by " & Request.Form("FirstName")& " " & Request.Form("LastName")
objMessage.Configuration.Fields.Item _
(" = 2
objMessage.Configuration.Fields.Item _
(" = "mail"
objMessage.Configuration.Fields.Item _
(" = 25
objMessage.Configuration.Fields.Update
objMessage.Send
Set objMessage = Nothing
End If
%>
I can hardcode the email address' in there and get it to work but I'm trying to get them from a recordset. Oh, there could be multiple addresses.
Any Ideas?
Dan
<%
If Request.Form("submit").Count > 0 Then
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "TSR Form"
objMessage.Sender = "Martin_Door_Intranet"
objMessage.To = <%=(Recordset1.Fields.Item(emailaddress).Value)%>
objMessage.TextBody = "This TSR was logged by " & Request.Form("FirstName")& " " & Request.Form("LastName")
objMessage.Configuration.Fields.Item _
(" = 2
objMessage.Configuration.Fields.Item _
(" = "mail"
objMessage.Configuration.Fields.Item _
(" = 25
objMessage.Configuration.Fields.Update
objMessage.Send
Set objMessage = Nothing
End If
%>
I can hardcode the email address' in there and get it to work but I'm trying to get them from a recordset. Oh, there could be multiple addresses.
Any Ideas?
Dan