PDA

View Full Version : help with test form


cbrundage
01-24-2011, 06:16 PM
I have tried using an asp test form emailed to me by 1&1 which doesn't work - after about 10 emails and phone calls I am giving up. No one there has a clue, in fact, one tech support person didn't know what asp was! Could someone tell me if I have it configured right below? Here is the test page (my email with 1&1 is christina@NOSPAMcbrundage.net. The error I get is "page cannot be displayed". If I can get this test page to work, I can then go on to get my form configured. Many thanks for any help - this is for a nonprofit cat shelter's application form and the cats will be grateful too!

<% @LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<%

Set Mail = Server.CreateObject("SMTPsvg.Mailer") 'create an Asp mail component.
Mail.FromName = "Christina"
Mail.FromAddress= Request.Form("email")
Mail.RemoteHost = "mrelay.perfora.net" ' The mail server you have to use with Asp Mail
Mail.AddRecipient "christina@cbrundage.net"
Mail.Subject = "Website - Info Request"
Mail.BodyText = Request.Form("Info")
if Mail.SendMail then
Response.Write "Your mail has already been sent..."
else
Response.Write "Mail send failure. Error was " & Mail.Response
end if
Set Mail = Nothing
%>
</body>
</html>

The html page they sent also comes up fine and the pertinent line is
<form onSubmit="return ValidateForm()" name="form1" method="post" action="forminfo.asp">

Old Pedant
01-29-2011, 09:39 PM
Sorry I didn't notice this post before.

Have you resolved this???

I assume you are basing your code on this page from their FAQs:
http://faq.1and1.com/scripting_languages_supported/asp_active_server_pages/4.html

I would *suspect* that the problem is that you are trying to use the user's email address as the "from" address. More than likely, that's not supported by the mailer.

*Probably* you should be using your own email address for both the from and to addresses. You would then put the user's email address into the body of the message to yourself.

Maybe like this:

Set Mail = Server.CreateObject("SMTPsvg.Mailer") 'create an Asp mail component.
Mail.FromName = "Christina"
Mail.FromAddress= "christina@cbrundage.net"
Mail.RemoteHost = "mrelay.perfora.net" ' The mail server you have to use with Asp Mail
Mail.AddRecipient "Christina", "christina@cbrundage.net"
Mail.Subject = "Website - Info Request"
Mail.BodyText = "From " & Request.Form("email") & ":" & vbNewLinew & Request.Form("Info")
if Mail.SendMail then
Response.Write "Your mail has been sent..."
else
Response.Write "Mail send failure. Error was " & Mail.Response
end if
Set Mail = Nothing
...

But if that doesn't work, you'll have to DEBUG DEBUG DEBUG.

Old Pedant
01-29-2011, 09:39 PM
Not to ask a dumb question, but... Do you use ASP for any other pages on the site??? If not, are you sure that you *can* use ASP??? If you are on a Linux hosting plan, ASP is not available.