1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
| <!-- #include virtual="/ecolopoint/includes/ESELFuncs.asp" -->
<%
Dim eBody 'the main content of the email
eBody = " " & vbCrLf & vbCrLf 'adds the first line and a blank line
Dim eBodyArray()
Redim eBodyArray(0)
For Each i in Request.QueryString
If Right( i, 2 ) <> ".x" And Right( i, 2 ) <> ".y" And i <> "x" And i <> "y" Then
eBody = ""
eBody = eBody & i
eBody = eBody & " = "
eBody = eBody & Request.QueryString(i) & vbCrLf
eBodyArray(UBound( eBodyArray )) = eBody
Redim Preserve eBodyArray(UBound( eBodyArray ) + 1)
End If
Next
For Each i in Request.Form
If Right( i, 2 ) <> ".x" And Right( i, 2 ) <> ".y" And i <> "x" And i <> "y" Then
eBody = ""
eBody = eBody & i
eBody = eBody & " = "
eBody = eBody & Request.Form(i) & vbCrLf
eBodyArray(UBound( eBodyArray )) = eBody
Redim Preserve eBodyArray(UBound( eBodyArray ) + 1)
End If
Next
Redim Preserve eBodyArray(UBound( eBodyArray ) - 1)
eBody = Join( bubbleSort( eBodyArray ), vbCrLf )
If not isEmpty( Request( "ebodyreplace" ) ) Then
ebody = Request( "ebodyreplace" ) 'any email address but shows who sent the message
End If
'Set objMail = CreateObject("CDONTS.NewMail")
myFrom = "riwalenn@gmail.com" 'any email address but shows who sent the message
'myFrom = "info@operationrecyclage.com" 'any email address but shows who sent the message
Response.Write( "<!-- myTo = " & myFrom & ", then = ")
'objMail.From = "admin@recyclingappeal.com" 'any email address but shows who sent the message
If not isEmpty( Request( "EMAIL" ) ) Then
If instr( Request( "EMAIL" ), "@" ) Then
myFrom = Request( "EMAIL" ) 'any email address but shows who sent the message
End If
End If
Response.Write( myFrom & "-->" )
'myTo = "benp@redeemplc.com"
myTo = "riwalenn@gmail.com"
Response.Write( "<!-- myTo = " & myTo & ", then = ")
If not isEmpty( Request( "emailaddressto" ) ) Then
If instr( Request( "emailaddressto" ), "@" ) Then
myTo = Request( "emailaddressto" ) 'any email address but shows who sent the message
End If
End If
Response.Write( myTo & "-->" )
CC = "" 'address that a carbon copy of the message should go to
Subject = "Automated Operation Recyclage Website Message" 'the subject line of the email
If not IsEmpty( Request( "subject" ) ) Then
Subject = Request( "subject" ) 'the subject line of the email
End If
'Body = eBody 'adds all the form code as the email body
Response.Write( vbCrLf )
Response.Write( "<!-- DEBUG_INFO " )
Response.Write( vbCrLf )
'Response.Write( objMail.Body )
Response.Write( vbCrLf )
Response.Write( myTo )
Response.Write( vbCrLf )
'Response.Write( objMail.From )
Response.Write( vbCrLf )
'Response.Write( objMail.Subject )
Response.Write( "-->" )
Response.Write( vbCrLf )
Response.Write( vbCrLf )
ErrorText = ""
On Error Resume Next
'objMail.Send() 'actually sends the email
SendEmail myTo, myFrom, Subject, eBody
If err Then
Heading = "Error"
MainText = "There was an error sending your request, please try again later"
ErrorText = err & ", " & Err.description
Else
If not isEmpty( Request( "thankyouheading" ) ) Then
Heading = Request( "thankyouheading" )
Else
Heading = "Thank you"
End If
If not isEmpty( Request( "thankyoumessage" ) ) Then
If not isEmpty( Request( "forename" ) ) Then
MainText = "<h3>" & Request( "forename" ) & "</h3>" & "<br />" & vbCrLf & Request( "thankyoumessage" )
Else
MainText = Request( "thankyoumessage" )
End If
Else
MainText = "Thank you"
End If
End If
'Set objMail = Nothing 'deletes the email object from computer memory [good housekeeping]
%> |
Partager