Hi everyone
This is my first post and i dare say there will be a few more by the time i'm finished.
Just wondering if one of you kind folk could help me to get my form up running by giving me an idiots guide with this sendmail.asp i was giving by my host provider.
I have made a form using golive cs2. i have no problem with dragging and dropping and arrangeing on a page but when it cames to this code malarkey well that's me finished.
What i need to know is what bits do i take out and what bits do i put it.
It even tells me in the asp file what to do but still can't get my head around. must be old age i dunno.
here is the asp code
In the get form data do i keep the entry request.form or do i replace this with my details not too sure about the referrer business but not i'm not sure about all of it.
any help would be much appreciated
thanks
mark
<%@LANGUAGE = VBSCRIPT%>
<html>
<body>
<%
' Get the form data
name = Request.Form("name")
senderEmail = Request.Form("email")
subject = "Regarding " & Request.Form("subject")
recipient = Request.Form("recipient")
body = Request.Form("body")
strReferer = request.servervariables("HTTP_REFERER")
strServer = Replace(request.servervariables("SERVER_NAME"),"ww w.","")
strSMTPServer = "smtp." & strServer
' check referer
intComp = inStr(strReferer, strServer)
If intComp > 0 Then
blnSpam = False
Else
' Spam Attempt Block
blnSpam = True
End If
' Create the JMail message Object
set msg = Server.CreateOBject( "JMail.Message" )
' Set logging to true to ease any potential debugging
' And set silent to true in case you wish to handle the errors yourself
msg.Logging = true
msg.silent = true
' Enter the sender data
msg.From = senderEmail
' Note that as addRecipient is a method and not
' a property, you do not use an equals ( = ) sign
msg.AddRecipient recipient
' The subject of the message
msg.Subject = subject
' And the body
msg.body = body
' Now send the message, using the indicated mailserver
If NOT blnSpam Then
if not msg.Send(strSMTPServer ) then
Response.write "<pre>" & msg.log & "</pre>"
else
Response.write "Message sent successfully!"
end if
end if
' Clear the object
set msg = nothing
%>
</body>
</html>