|
|
#1 |
|
Text Box that will send an email
Hey everyone,
What I am trying to do is create a form on my website that people can type stuff in a text box and it will email it to my address. I've done it before, but I think it was on my Geocities site and it was already setup for me. I know there is a javascript out there that will do it, but all the ones I have googled don't seem to work. Do I need something special on my server? If anyone can provide me with a script that would be great. Thanks a lot! |
|
|
|
0
|
|
|
#2 |
|
The one here: http://www.web-source.net/html_email_form.htm requires the user to actually have an e-mail client. Most others I see either require server-side software or a lot of PHP code.
TEG
__________________
Apple and Dell are the only ones in this industry making money. They make it by being Wal-Mart. We make it by innovation, - Steve Jobs
The Tegian Zone-Glass Onion Radio |
|
|
|
0
|
|
|
#3 |
|
__________________
|
|
|
|
0
|
|
|
#4 |
|
HTML and JavaScript have no ability to send mail. The best that they can do, as TEG's link shows, is to cause a window in the local email client to open in order to use it to send the message.
If you want to send the message directly from the page, there must be a server-side component to handle it. There are tons of PHP examples out there, and JavaMail is pretty easy to use if your backend is Java powered. |
|
|
|
0
|
|
|
#5 |
|
It's easy. Your form simply sends the test back to the server. A script on the server then stuffs the text into a system command (such as "sendmail") then the script sends the command to be run by using a "system" or "exec" command.
|
|
|
|
0
|
|
|
#6 |
|
Thanks a lot everyone. I knew there had to be a server-side to it. I got one to work that opens up an email client, but a lot of people don't have theirs set up and stuff like that.
I use Go Daddy for my site, so I'll check with them to see if they have anything available to use. ![]() *Edit*- I used the link provided by jdl8422 and it worked great. Thanks
Last edited by MacFan782040; Sep 8, 2008 at 08:38 PM. |
|
|
|
0
|
|
|
#7 | |
|
Quote:
|
||
|
|
0
|
|
|
#8 |
|
I used these php files for my website: http://www.ibdhost.com/contact/
|
|
|
|
0
|
|
|
#9 |
|
Here is something quick I just wrote up:
contact.php PHP Code:
sendmail.php PHP Code:
MC |
|
|
|
0
|
|
|
#10 |
|
Table layouts. Really? The code also isn't valid or semantically correct. I know you're trying to give a short example, but the code does next to no validation. If you were to actually use that code you would have your inbox spammed big time and likely would become someones spambot and you'd be legally responsible. That PHP code should not be used as is, it could make for a starting point though.
Until a developer is comfortable with data validation and the like, I recommend sticking with scripts that have been developed well and take these extra things into consideration for you so you don't get yourself into spam hell. Last edited by angelwatt; Sep 11, 2008 at 10:28 AM. |
|
|
|
0
|
|
|
#11 |
|
All of you are awesome. Thanks for the help.
I have 1 more for ya... ![]() Basically I run my organization's website. We are required to do library hours, and usually we log them in a binder at the library, but we wanted to see if we could do it instead on our website. Is there some kind of database script that will allow about 50 people or so to choose their name, and then add hours, and it will update a table with everyone's names and hours? Thanks again! |
|
|
|
0
|
|
|
#12 | |
|
Quote:
|
||
|
|
0
|
|
|
#13 | |
|
Quote:
PHP Code:
|
||
|
|
0
|
|
|
#14 | |
|
Quote:
This wasn't attack on you MCRunning, I just want to make sure the OP doesn't think he can copy and paste the code you provide as is without further consideration, and to also explain why he shouldn't. Your post simply opened up that opportunity so don't take what I've said personally because it's not meant as such. For those interested in using PHP for form validation like you would do for a contact form you can find some good reading at PHP Security Consortium to get you thinking about security. Others readings: |
||
|
|
0
|
|
|
#15 |
|
I totally see where you are coming from angel, but at the same time it's like when you hire someone to do your work for you. If you don't tell them exactly what you want, you will get exactly what you paid for.
Say he hired a programmer to do this job for him and asked for a text box that when a user submitted information it emailed him whatever was in the text box. The programmer will give him exactly that, then later he realizes he is getting spammed and needs validation. He will go back to the programmer and say why didn't you include validation?! And of course the programmer will say "you didn't ask for validation". Hopefully a lesson was learned from this ![]() MC |
|
|
|
0
|
|
|
#16 |
|
Yea, get a better programmer that keeps the customer's lack of knowledge in mind
![]() Kidding aside though, customers will never be able to tell a programmer exactly what they want/need. If they knew that level of detail they'd likely be able to do it them self. I work in an area where even amongst professionals who work together on a regular basis, but with differing backgrounds, have a lot of trouble talking about certain things because they come from different areas and perspectives. A good programmer will know what follow up questions to do with a customer (through experience) and what things to provide that are not asked for, but are needed. I mean when you want an oil change for your car you don't tell the mechanic that the old oil removed as well. He'd likely upset at you telling him his job and for making stupid statements. OK, I'm done talking off topic. Sorry to OP for getting so far off from topic. Let us know if you need anything further. |
|
|
|
0
|
|
|
#17 |
|
PHP Code:
MC |
|
|
|
0
|
|
|
#18 |
|
A huge thanks to all of you!
I downloaded the Time Management thing from angelwatt but I don't really have a clue how to customize it.. I'm more familiar with HTML.
Last edited by MacFan782040; Sep 12, 2008 at 12:11 AM. |
|
|
|
0
|
![]() |
|
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| thread | Thread Starter | Forum | Replies | Last Post |
| Need an Aapp that will send SMS once connected | MikeonTV | iPhone and iPod touch Apps | 3 | Apr 13, 2011 02:54 PM |
| OS X app that will send text messages? | theNEOone | Mac Applications and Mac App Store | 5 | Mar 7, 2009 05:37 PM |
| Popup box when sending an email | mbutler | MacBook Pro | 1 | May 2, 2007 06:49 PM |
| Popup box when sending an email | mbutler | MacBook Pro | 1 | Apr 26, 2007 01:21 PM |
| Need app that will send me my current WAN IP via email | G4Grover | Mac Applications and Mac App Store | 6 | Oct 20, 2004 10:01 PM |
All times are GMT -5. The time now is 02:32 AM.














Linear Mode

