B
Benny Alexander
Hi,
I am using a simple form 2 email program. I ama experienced programmer, But
I feel very bad, as I am unable to fix this problem.
All seems to be fine, But the mail is not reacing to my mail box. Here is
the code!
The form has just three values!
<%
name = request.form("name")
email = request.form("email")
message = request.form("message")
If name="" or email="" or message="" Then
url = "contact.asp?reqd=* indicates required field&name=" & name & "&email="
& email & "&message=" & message
If name="" Then
url = url & "&mname=*"
End if
If email="" Then
url = url & "&memail=*"
End if
If message="" Then
url = url & "&mmessage=*"
End if
response.redirect url & "&foobar=foobar#form"
response.end
End if
Dim objCDONTS ' Email object
Dim strFromName ' From persons' real name
Dim strFromEmail, strToEmail ' Email addresses
Dim strSubject, strBody ' Message
Dim misccompo
strSubject = "Enquiry from Centwinmills.com website FORM"
strFromName = Trim(Request.Form("name"))
strFromEmail = Trim(Request.Form("email"))
strToEmail = "(e-mail address removed)"
strBody = Trim(Request.Form("message"))
Set objCDONTS = Server.CreateObject("CDONTS.NewMail")
objCDONTS.From = strFromName & " <" &
strFromEmail & ">"
objCDONTS.To = strToEmail
objCDONTS.Subject = strSubject
objCDONTS.Body = "--------------------------------------" &
vbcrlf & vbcrlf & strbody & vbcrlf & vbcrlf & vbcrlf &
"--------------------------------------------------------------" & vbcrlf &
"MESSAGE ENDS: End of message"
objCDONTS.Send
Set objCDONTS = Nothing
response.redirect "thanks.asp"
response.end
%>
Jose
I am using a simple form 2 email program. I ama experienced programmer, But
I feel very bad, as I am unable to fix this problem.
All seems to be fine, But the mail is not reacing to my mail box. Here is
the code!
The form has just three values!
<%
name = request.form("name")
email = request.form("email")
message = request.form("message")
If name="" or email="" or message="" Then
url = "contact.asp?reqd=* indicates required field&name=" & name & "&email="
& email & "&message=" & message
If name="" Then
url = url & "&mname=*"
End if
If email="" Then
url = url & "&memail=*"
End if
If message="" Then
url = url & "&mmessage=*"
End if
response.redirect url & "&foobar=foobar#form"
response.end
End if
Dim objCDONTS ' Email object
Dim strFromName ' From persons' real name
Dim strFromEmail, strToEmail ' Email addresses
Dim strSubject, strBody ' Message
Dim misccompo
strSubject = "Enquiry from Centwinmills.com website FORM"
strFromName = Trim(Request.Form("name"))
strFromEmail = Trim(Request.Form("email"))
strToEmail = "(e-mail address removed)"
strBody = Trim(Request.Form("message"))
Set objCDONTS = Server.CreateObject("CDONTS.NewMail")
objCDONTS.From = strFromName & " <" &
strFromEmail & ">"
objCDONTS.To = strToEmail
objCDONTS.Subject = strSubject
objCDONTS.Body = "--------------------------------------" &
vbcrlf & vbcrlf & strbody & vbcrlf & vbcrlf & vbcrlf &
"--------------------------------------------------------------" & vbcrlf &
"MESSAGE ENDS: End of message"
objCDONTS.Send
Set objCDONTS = Nothing
response.redirect "thanks.asp"
response.end
%>
Jose