navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Free FrontPage Templates

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

.asp wont email .htm wont display data

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> .asp wont email .htm wont display data
Page: [1]
 
deb31220

 

Posts: 6
Joined: 8/11/2005
Status: offline

 
.asp wont email .htm wont display data - 8/11/2005 21:06:25   
I have a database that I created with Access. All my pages are working property (results, edit, search). I would like the user to be able to click on a particular record linked to a form page that would contain a few database fields, the form would then submit to my email. I have tried several things but nothing works. My main problem, i think, is that the DRW requires the page to have the .asp extension but I guess it's my web host (bcentral) that requires .htm on email forms. Anyone got any ideas????
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: .asp wont email .htm wont display data - 8/11/2005 22:26:54   
Welcome to OutFront

If you are trying to use FP's send to email function, then that is the culprit. The email feature only works on .htm pages. You will want to see what email components your host supports and use it to send mail. Guessing they support CDOSYS.

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to deb31220)
deb31220

 

Posts: 6
Joined: 8/11/2005
Status: offline

 
RE: .asp wont email .htm wont display data - 8/12/2005 13:14:04   
I did a search on the support site for my host, bcentral, and it returned nothing for "email components" or for CDOSYS. I'm not sure I know what you are talking about. Is there another way I can display database fields then have the user click a submit button to send those fields to my email???

(in reply to deb31220)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: .asp wont email .htm wont display data - 8/12/2005 13:38:23   
I promise you Bcentral supports some sort of email component. In fact, I believe I did work on a site hosted by them and if I recall, they use CDOSYS. What you would do is have the form submit to a second page on which you put the email script that takes care of the mailing. I haven't done any email scripts for a while. To verify that is supported, take the script here:

http://quadcomm.com/tips/sendCDOSYSmail.asp

Paste it into a new page. Replace the email addresses shown in the script with your own. Save the page with a .asp extension and then publish it (Or just create the page live on the server). VIew it in your browser and see if the mail is sent.

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to deb31220)
deb31220

 

Posts: 6
Joined: 8/11/2005
Status: offline

 
RE: .asp wont email .htm wont display data - 8/12/2005 21:04:32   
The script works! It really works! I"m going to work on the form now, making it submit to the other form and see how it does!!! I'll let you know.

(in reply to deb31220)
deb31220

 

Posts: 6
Joined: 8/11/2005
Status: offline

 
RE: .asp wont email .htm wont display data - 8/12/2005 21:09:58   
ok, here's what i tried. i created a page called form.asp then inserted database results, click form properties, clicked other (custom), then set action to email.asp and method to POST. I get an email but it's the same one i got with just the email.asp page before. how do i tell the email script to send me the database results from the previous page???

(in reply to deb31220)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: .asp wont email .htm wont display data - 8/12/2005 21:54:13   
The body of the message is this line:

sTextBody = "Insert here your plain body text"

So, supposing your form has a textarea named myField. Change the above to:

sTextBody = Request.Form("myField")

That should make the contents of the textarea become the body of the email. You can use a combination of text and form fields to compose the body however you want. This example uses html:

http://www.quadrahosting.com.au/kb/article-93.html


_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to deb31220)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: .asp wont email .htm wont display data - 8/12/2005 22:16:21   
This is a very good example of how to build the body of your message from form fields. Note: The example uses CDONTS, the predecesor to CDOSYS, so just pay attention to the part on building the body.

http://www.webthang.co.uk/tuts/tuts_dmx04/mailers/mailers3.asp

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to BeTheBall)
deb31220

 

Posts: 6
Joined: 8/11/2005
Status: offline

 
RE: .asp wont email .htm wont display data - 8/12/2005 22:52:23   
I created a submission form that creates a new database record and sent that form to the email.asp form and all works. i got an email with the form field data. But what i need to do is take a page that displays database results of an already entered record and email the fields on that results page. does that make sense? here's what i tried - i created a form then i used the drw inside of the form to display a field name, LastName, of a record then sent the form to email.asp. i get an email with a blank subject although i did add this line to the email.asp page - sTextBody = Request.Form("LastName")

(in reply to BeTheBall)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: .asp wont email .htm wont display data - 8/12/2005 22:57:01   
Paste the full code for the email page.

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to deb31220)
deb31220

 

Posts: 6
Joined: 8/11/2005
Status: offline

 
RE: .asp wont email .htm wont display data - 8/13/2005 13:12:26   
Yeah! I got it working. I placed hidden fields on the form so now it's picking up the field data. One more question though, On this line: sSubject = Request.Form("LastName")
I would like to display LastName and FirstName. I've tried every combination I can think of:
sSubject = Request.Form("LastName" & "FirstName")
sSubject = Request.Form("LastName" , "FirstName")
sSubject = Request.Form("LastName")("FirstName")

The form won't work at all and I get "The Page Cannot Be Displayed". How can I put these two fields in the subject??

(in reply to BeTheBall)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: .asp wont email .htm wont display data - 8/13/2005 13:32:14   
You must put Request.Form in front of each Form field. Something like below will give you an output of:

Doe, John

sSubject = Request.Form("LastName") &", "& Request.Form("FirstName")

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to deb31220)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> .asp wont email .htm wont display data
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts