There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
access audio avg avg 8 bios blue screen boot bsod computer connection cpu crash css dell desktop dma driver drivers dvd email error excel explorer firefox firefox 3 freeze gimp graphics hard drive hardware hijackthis hjt install internet internet explorer itunes keyboard laptop macro malware monitor motherboard network networking outlook outlook 2003 outlook 2007 outlook express pio problem problems router seo server slow sound sp3 spyware trojan usb video virtumonde virus vista vundo windows windows vista windows xp winxp wireless
Web Design & Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
Emailing a prefabricated email message over a local html page (HELP)


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

 
Thread Tools
fanny pack 2.0's Avatar
Member with 36 posts.
 
Join Date: Sep 2007
Experience: Advanced
16-Jan-2008, 10:49 PM #1
Emailing a prefabricated email message over a local html page (HELP)
Okay so this is kind of hard to explain but here we go. I need some help. I want to have a prefabricated email message with a mapquest modified directions form and written directions to our business center's location using a simple form for our employees to use.

the window our employees would look at would look like this

|==Form window==| <this is where our employees would put in the persons email addy
o location 1
o location 2
|SUBMIT|

The employee would enter the persons email and select which business center they are trying to reach and hit submit. In turn, this would send a prefabricated email.

The site / html page is on a local "server" (really just a shared drive amongst 7 computers on our systems) so it's not an internet live html operation nor an intranet. So yea, needing some help. Thank you in advance
TheRobatron's Avatar
Computer Specs
Senior Member with 417 posts.
 
Join Date: Oct 2007
Location: England
Experience: Intermediate
17-Jan-2008, 05:12 PM #2
You could use a simple PHP mail script:

PHP Code:
<?php
$to 
$_REQUEST('email');
$center $_REQUEST('center');
switch (
$center) {
case 
"Center 1":
$message "Message 1";
break;

case 
"Center 2":
$message "Message 2";
break;
}
mail($to,"Subject",$message"From: no-reply@yourdomain.com")
?>
In the above code, you change the 'email' and 'center' in brackets to the same as the name in the HTML form.

Hope that works.
fanny pack 2.0's Avatar
Member with 36 posts.
 
Join Date: Sep 2007
Experience: Advanced
17-Jan-2008, 05:34 PM #3
I threw that in a new php blank page in dreamweaver but once i saved that code there was nothing on the page to enter anything into, just random code. I've never really done PHP so is there something I am missing as far as running that code?
tomdkat's Avatar
Computer Specs
Distinguished Member with 3,521 posts.
 
Join Date: May 2006
Location: S.F. Bay Area, CA
Experience: Intermediate
17-Jan-2008, 07:23 PM #4
The PHP code will need to be processed by the PHP engine, which will be on the web server serving the page. You can't run the above PHP code without having a PHP environment available.

Can you post a screenshot of what you got when you saw "random code"?

Peace...
fanny pack 2.0's Avatar
Member with 36 posts.
 
Join Date: Sep 2007
Experience: Advanced
17-Jan-2008, 07:43 PM #5
Oh what I meant was it was just some php icon thingy inside the dreamweaver preview window.

For this html page, it's not sitting on a www.something.com server, it's just sitting as a file for our employees to view on a data storage server that all the staff computers see as a drive; in this case the F:/ drive. Therefor it's not running any type of PHP environment (nor would I know how to really set one up).

Here's some code inside something that might work (this is something i have working for another mailing purpose):
Quote:
set myMail=server.createobject("CDONTS.NewMail")
myMail.to="x@x.com; x@x.com"
myMail.from="x-noreply@x.com"
myMail.subject="Referral Information Gathered [Referral]"
myMail.bodyformat=0
myMail.mailformat=0
myMail.body=HTML_STR
myMail.send

''end mail sending


%>
I don't know if you know java or not, but i need to have a form pointing to the "myMail.to=" box to maybe send the body message inside it. If i could figure out how to do that I could probably accomplish this. I've tried in the past but couldn't find a fix to this solution.

Any ideas?
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are Off
Refbacks are Off

You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 03:15 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.