Thread: cgi confusion
Results 16 to 28 of 28
Related
-
Coding Confusion Forum: PHP Forum
Replies: 5
-
08-18-2003, 04:26 PM #16
Oh, and if you are not getting any errors, try turning off "Show Friendy HTTP errors" in Internet Options, Advanced.
If one of our members helps you, please click theicon to add to their reputation!
No support via email or private message - use the forums!
Before you ask, have you Searched?
-
08-18-2003, 07:18 PM #17
Is this a paid host right? You can't be paying much if they don't support CGI... Even many free hosts support that.
-
08-19-2003, 08:55 AM #18
My guess is that this is a Windows host; hence, the use of ASP instead of the *nix CGI.
-
08-19-2003, 04:23 PM #19
close, but not quite
Okay, the script is working...sort of.
When I click on the submit button, I am redirected to the proper page, and I do get an email but it is blank. I filled out my form and sent it to myself, but none of the information came through. I also wanted to put something in the subject line, but that isn't working either.
Here is the code again:
<html>
<head>
<title>Thank You</title>
</head>
<body>
<p align="center"><p> </p><p> </p><p align="center">
<font face="Verdana, "Trebuchet MS", Arial, sans-serif" size="2">Your information has been sumbitted.</font></p>
<%
FirstName = Request.Form("FirstName")
LastName = Request.Form("FirstName")
City = Request.Form("City")
State = Request.Form("State")
Phone = Request.Form("Phone")
SenderEmail = Request.Form("email")
bagged_shavings = Request.Form("bagged_shavings")
BaggedShavingsPrice = Request.Form("BaggedShavingsPrice")
bulk_shavings = Request.Form("BulkShavingsPrice")
straw = Request.Form("straw")
StrawPrice = Request.Form("StrawPrice")
rice_hulls = Request.Form("rice_hulls")
RiceHullsPrice = Request.Form("RiceHullsPrice")
other = Request.Form("other")
OtherBedding = Request.Form("OtherBedding")
OtherPrice = Request.Form("OtherPrice")
StallCount = Request.Form("StallCount")
BeddingPerWeek = Request.Form("BeddingPerWeek")
textfield = Request.Form("textfield")
Set JMail = Server.CreateObject("JMail.SMTPMail")
' Below you should enter your own SMTP-server
JMail.ServerAddress = "my SMTP-server"
JMail.Sender = Senderemail
JMail.Subject = BeddingCostAnalysisRequest
JMail.AddRecipient "caspixel@yahoo.com"
JMail.Body = Body
JMail.Priority = 1
JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR")
JMail.Logging = True
JMail.Execute
%>
<center>
By the way, Enigma is right, it is a Windows host, or at least, my account is considered a Windows account.
-
08-19-2003, 05:05 PM #20
Ahha.
Code:JMail.Body = Body
You need to build your email body using the variables you have set above, a small example -
Code:Body = "First name: " & FirstName & chr(10) Body = Body & "Second Name: " & LastName & chr(10)
If one of our members helps you, please click theicon to add to their reputation!
No support via email or private message - use the forums!
Before you ask, have you Searched?
-
08-19-2003, 05:06 PM #21
By the way, chr(10) is a newline. Works fine in plain text emails.
If one of our members helps you, please click theicon to add to their reputation!
No support via email or private message - use the forums!
Before you ask, have you Searched?
-
08-19-2003, 06:20 PM #22
getting closer
Thanks so much. I know I am getting closer to having this thing work. I am not quite clear on exactly how to write the code though.
I used this code first:
_________________________________________________________________________________
JMail.Body = Body = "First name: " & FirstName & chr(10)
JMail.Body = Body & "Last Name: " & LastName & chr(10)
JMail.Body = Body & "City: " & City & chr(10)
JMail.Body = Body & "State: " & State & chr(10)
JMail.Body = Body & "Phone: " & Phone & chr(10)
JMail.Body = Body & "email: " & email & chr(10)
JMail.Body = Body & "bagged_shavings: " & bagged_shavings & chr(10)
JMail.Body = Body & "BaggedShavingsPrice: " & BaggedShavingsPrice & chr(10)
_________________________________________________________________________________
and sent myself some information. All I got was BaggedShavingsPrice in the body of the email though.
then I tried this code:
____________________________________________________________________________________
JMail.Body = Body = "First name: " & FirstName & chr(10)
Body = Body & "Last Name: " & LastName & chr(10)
Body = Body & "City: " & City & chr(10)
Body = Body & "State: " & State & chr(10)
Body = Body & "Phone: " & Phone & chr(10)
Body = Body & "email: " & email & chr(10)
Body = Body & "bagged_shavings: " & bagged_shavings & chr(10)
Body = Body & "BaggedShavingsPrice: " & BaggedShavingsPrice & chr(10)
___________________________________________________________________________________
But then all I got was "False" in the body of the email.
There must be a variation that I am missing. I am sure it is simple and obvious and I am just that thick.
I am excited that I am at least getting something now.
Another thing, how do I get a subject line to show up. It is still showing up as subject "none".
-
08-19-2003, 06:32 PM #23
You were almost right in the first example.
the ampersand (&) is concatenating the string together. basically, we are saying that Body is equal to what Body already is, plus "whatever" on the end.
Replace
JMail.Body = Body = "First name: " & FirstName & chr(10)
with
Code:JMail.Body = Jmail.Body & "First name: " & FirstName & chr(10)
Replace Body with Jmail.Body in the other lines and it should work. *fingers crossed*If one of our members helps you, please click theicon to add to their reputation!
No support via email or private message - use the forums!
Before you ask, have you Searched?
-
08-19-2003, 09:58 PM #24
party time!
It works!!!
Now, just one more order of business. I would like to have some text show up in the subject line when it gets emailed to me. I did enter some text where I thought it should go in the code:
JMail.Subject = BeddingCostAnalysisRequest
but the email is coming in with [none] in the subject area. Do you know how to fix this?
Also, I can't tell you how much I appreciate your help QuietDean. Is there a typical protocol for sending thanks? Your help has really been invaluable.
15 minutes later....
Well it worked once, then I started getting a weird message when I tried it later. This is what appeared on after I clicked "Submit"
Your information has been sumbitted.
jmail.SMTPMail error '8000ffff'
The message was undeliverable. All servers failed to receive the message
/hheaven/woody_pet_pro/sendmail.asp, line 71
What the heck does that mean?Last edited by Carolynne; 08-19-2003 at 10:12 PM.
-
08-19-2003, 10:11 PM #25
Originally Posted by Carolynne
Notice on the bottom of each post, to the left of the "edit" button, there is a square image. By clicking this link you may vote positively or negatively. This awards points or takes points away resulting in a user "reputation" which is displayed by the green squares below the user name. When doing a mouseover on the green squares you will see a positive or negative comment.
When you vote there is also a textbox where you can leave a brief message of thanks.
disclaimer: I am still working on the new forum so understand this function is still pretty "raw".
Dave
-
08-20-2003, 03:05 AM #26
Ahha.
Any time you find a 'wierd' message, the best thing you can do with it is just paste it into google. I'm not kidding, Google is that good.
I pasted the error, hit 'Im feeling lucky', and got this -
jmail.SMTPMail error '8000ffff'
The message was undeliverable. All servers failed to recieve the message
The mailserver(s) you specified either weren't set up to receive emails from your webserver or you didn't enter a valid mailserver. You must enter the full name or IPaddress, you can't just enter the network name of your mailserver. Also, some systems prefer if you specify port, which usually is 25.
To set the subject, just use whatever you want, eg -
Code:JMail.Subject = "My Subject"
If one of our members helps you, please click theicon to add to their reputation!
No support via email or private message - use the forums!
Before you ask, have you Searched?
-
08-20-2003, 12:47 PM #27
onto the next thing
Does anyone know anything about HTML emails.
I have some clients that I would like to start sending
e-newsletters to, but I need some info on how to do the code.
Thanks!
-
08-20-2003, 01:02 PM #28
have a look at Jmails method list, its all there -
http://www.juicystudio.com/tutorial/asp/jmail.htmlIf one of our members helps you, please click theicon to add to their reputation!
No support via email or private message - use the forums!
Before you ask, have you Searched?
Cloudjiffy- PaaS for Developers
10-05-2020, 12:30 AM in Web Hosting Forum