Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Website Design/Showcase (http://www.chiefdelphi.com/forums/forumdisplay.php?f=64)
-   -   Without ASP or CGI? (http://www.chiefdelphi.com/forums/showthread.php?t=21520)

Aignam 31-07-2003 19:47

Without ASP or CGI?
 
Hey, I was wondering if it is possible to use JavaScript to have submitted form contents e-mailed to a specific e-mail without using ASP or CGI.

Brandon Martus 31-07-2003 19:51

JavaScript cannot email, as far as I know.

piotrm 31-07-2003 21:00

Quote:

Originally posted by Brandon Martus
JavaScript cannot email, as far as I know.
I believe that is correct as it would be a serious security problem if Javascript could send emails (imagine going to a website which made your computer send a few dozen spam messages to random recepients on your every visit).

I think the reason you are asking about this is because your web host doesn't allow cgi or other server side services that are capable of mailing. That is too bad. However you can use a free mailer cgi service that is available around various websites. I just did a google search for "free 'mailer cgi'" and found http://www.gwh.com/cgi/formail/page_e.htm which seems to be a free mailer service which you can use. I haven't tested it but the page has the info necessarity to do a quick test run and if it doesnt work or is dont try searching for a different one.

As far as javascript goes; you would need to initiate a request for a url with javascript to send the email (unless you wanna go for plain html forms which are fine). I'm not sure the capabillities of javascript nowadays but an easy way to do this would be to hidden frame and make javascript set the location to get a frame from. This location would be the mailerscript with the properly formatted query string.

Good luck...

Aignam 31-07-2003 22:55

Thanks guys---this will help alot. You hit the nail on the head with the server not allowing CGI thing---if only i can convince my brother to open up a port on my network so I can host....

Raven_Writer 01-08-2003 10:34

http://www.bravenet.com also offers a e-mailer script along w/ a slew of others :)

Rickertsen2 01-08-2003 14:11

Actually jscript has email ability, however VERY. It can open the user's email client with the adress bar filled in. It doesn't sound like this is of much help in your case but i just thought you might want ot know.

As far as free hosts, which allow server side scripting languages, try this site:
http://netfirms.com
They are free and support CGI. I have had a pretty good experience w/them.

Raven_Writer 01-08-2003 14:13

Quote:

Originally posted by Rickertsen2
Actually jscript has email ability, however VERY. It can open the user's email client with the adress bar filled in. It doesn't sound like this is of much help in your case but i just thought you might want ot know.

As far as free hosts, which allow server side scripting languages, try this site:
http://netfirms.com
They are free and support CGI. I have had a pretty good experience w/them.

www.coolfreepages.com allows PHP/MySQL (which can be used to do a mail-sending sorta thing).

KevinB 01-08-2003 15:11

You can always just do this (no JavaScript needed):

PHP Code:

<form action="mailto:ADDRESS@DOMAIN.COM">
 .... 
form junk here ... 
</
form

However, that only works if the user has a mail client installed and functioning correctly.

Raven_Writer 01-08-2003 15:15

Quote:

Originally posted by KevinB
You can always just do this (no JavaScript needed):

PHP Code:

<form action="mailto:ADDRESS@DOMAIN.COM">
 .... 
form junk here ... 
</
form

However, that only works if the user has a mail client installed and functioning correctly.

I'd like to say that the purpose of this thread is because his host does not have a mail client (AFAIK).

Brandon Martus 01-08-2003 15:16

Quote:

Originally posted by Raven_Writer
I'd like to say that the purpose of this thread is because his host does not have a mail client (AFAIK).
The html they put was dependent on the user having an e-mail cilent (outlook, eudora, etc), not the host.

Aignam 01-08-2003 15:26

Quote:

Originally posted by Brandon Martus
The html they put was dependent on the user having an e-mail cilent (outlook, eudora, etc), not the host.
I'm not to clear on what would happen if I were to use that method. It would open their client up and the user would have to send the information manually?

Brandon Martus 01-08-2003 15:55

Quote:

Originally posted by Aignam
I'm not to clear on what would happen if I were to use that method. It would open their client up and the user would have to send the information manually?
Yes. You can prepopulate the subject & the message, I believe. But they would have to hit send.

Raven_Writer 01-08-2003 16:02

Quote:

Originally posted by Brandon Martus
Yes. You can prepopulate the subject & the message, I believe. But they would have to hit send.
If you are going to do that, why not just use a hyperlink?

PHP Code:

<a href="mailto:enter the e-mail here?subject=enter subject title here">e-mail me!</a

*I had to add some cool coloring*

That seems pretty safe....

Aignam 01-08-2003 18:49

Because if I did it with JavaScript and a form, they could type their info into the form rather than having to type out the whole e-mail.

KevinB 01-08-2003 23:54

Another thought --- There are free webhosts that support CGI you could host the form mail script on.

http://www.hypermart.net/ has always been my favorite.

AJ Quick 02-08-2003 01:30

I thought the

<form action="mailto:ADDRESS@DOMAIN.COM">
.... form junk here ...
</form>


method didn't open up a email window. I know I used to use that method several years ago, and it would email the form data when the person hit submit. It wouldn't however, make a good email I think it made an attachement with the formdata in it. It does require some type of SMTP sending method though.


All times are GMT -5. The time now is 16:20.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi