|
<%
if Request.ServerVariables("HTTP_METHOD") = "POST" then
'''''''''''''''''''''''''''''''''''
sFName = request.form( "sFName" )
sLName = request.form( "sLName" )
sPhone = request.form( "sPhone" )
sEmail = request.form( "sEmail" )
sComments = request.form( "sComments" )
IF sEmail = "" THEN
sEmail = "stoppain@chpnet.org"
END IF
IF sFNAME = "" THEN
sFNAME = "Site Visitor"
END IF
'''''''''''''''''''''''''''''''''''
message = "This form was Sent On: " & now() & vbNewLine & _
"From: " & vbTab & vbTab & sFName & " " & sLName & vbNewLine & _
"E-mail:" & vbTab & vbTab & sEmail & vbNewLine & _
"Phone:" & vbTab & vbTab & sPhone & vbNewLine & vbNewLine & _
"Questions/Comments: " & sComments & vbNewLine & vbNewLine
strSubject = "Stoppain.org - Appointment Request"
strFromName = sFName & " " & sLName
strFromEmail = sEmail
strToEmail = "stoppain@chpnet.org"
'strToEmail = "dschulte@informationexperts.com"
strBody = message
'Set objCDONTS = Server.CreateObject("CDONTS.NewMail")
'objCDONTS.From = strFromName & " <" & strFromEmail & ">"
'objCDONTS.To = strToEmail
'objCDONTS.Subject = strSubject
'objCDONTS.Body = strbody
'objCDONTS.Send
'Set objCDONTS = Nothing
Dim iConf
Dim Flds
Set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
With Flds
.Item(cdoSMTPServer)= "127.0.0.1"
End With
Set Mail = CreateObject("CDO.Message")
If err.number = 0 then
Mail.Configuration = iConf
Mail.From = strFromName & " <" & strFromEmail & ">"
Mail.To = strToEmail
Mail.Subject = strSubject
Mail.TextBody = strbody
Mail.Send
End if
Set Mail = Nothing
IF sEmail <> "stoppain@chpnet.org" THEN
thismessage = "Thank you for your request to make an appointment to see a pain specialist / palliative care specialist in the Department of Pain Medicine and Palliative Care at Beth Israel Medical Center, New York. We will be contacting you shortly."
'Set objCDONTS = Server.CreateObject("CDONTS.NewMail")
'objCDONTS.From = "Department of Pain Medicine and Palliative Care" & " <" & strToEmail & ">"
'objCDONTS.To = strFromEmail
'objCDONTS.Subject = "Thank You"
'objCDONTS.Body = thismessage
'objCDONTS.Send
'Set objCDONTS = Nothing
Set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
With Flds
.Item(cdoSMTPServer)= "127.0.0.1"
End With
Set Mail = CreateObject("CDO.Message")
If err.number = 0 then
Mail.Configuration = iConf
Mail.From = "Department of Pain Medicine and Palliative Care" & " <" & strToEmail & ">"
Mail.To = strFromEmail
Mail.Subject = "Thank You"
Mail.TextBody = thismessage
Mail.Send
End if
Set Mail = Nothing
END IF
response.redirect "thanks.asp"
response.end
END IF
%>
|
|
| Department of Pain Medicine and Palliative Care Beth Israel Medical Center, New York City ©2008 Continuum Health Partners, Inc. www.StopPain.org |
![]() |