Simple Form Problem!

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
 
K

Ken Schaefer

On the webserver, is the mail ending up in the badmail directory?

Cheers
Ken

message : 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
:
:
 
B

Benny Alexander

Hen,

I do not know how to find it? I am in a shared hosting!

regards,
Benny
 
K

Ken Schaefer

You'll need to ask your ISP.

One thing to be aware of - the From: domain needs to be resolvable in the
DNS. If the From: address contains a non-existant domain, then your mail
will not be delivered by the MS SMTP server. So, when testing this page,
make sure that the From: address you put in has a valid domain.

Otherwise, just looking quickly over your code, it seems fine.

Cheers
Ken

message : Hen,
:
: I do not know how to find it? I am in a shared hosting!
:
: regards,
: Benny
 
B

Benny Alexander

Ken

Thanks for the advice.

I check from my local webserver too. Its all bounced back to my bad mail
folder.

How would I do a valid domain config? Can you advice more?

Regards,
Benny
 
K

Ken Schaefer

Well, the From: address needs to be a valid domain...

So, for example, you could try:

(e-mail address removed)

since hotmail.com is a valid domain (the SMTP server doesn't check the
actual account, just the domain). Also, you'll need to be connected to the
'Net when you do this (so that the SMTP server can go out and check that
hotmail.com actually exists)

Cheers
Ken


message : Ken
:
: Thanks for the advice.
:
: I check from my local webserver too. Its all bounced back to my bad mail
: folder.
:
: How would I do a valid domain config? Can you advice more?
:
: Regards,
: Benny
: : > You'll need to ask your ISP.
: >
: > One thing to be aware of - the From: domain needs to be resolvable in
the
: > DNS. If the From: address contains a non-existant domain, then your mail
: > will not be delivered by the MS SMTP server. So, when testing this page,
: > make sure that the From: address you put in has a valid domain.
: >
: > Otherwise, just looking quickly over your code, it seems fine.
: >
: > Cheers
: > Ken
: >
: > message : > : Hen,
: > :
: > : I do not know how to find it? I am in a shared hosting!
: > :
: > : regards,
: > : Benny
: >
: >
:
:
 
B

Benny Alexander

Ken,

Even now I am not able to get it, I test with various email ids!

Benny
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top