Beginner Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsOtherBeginner Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 13th, 2000, 01:37 PM
KK0743 KK0743 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Location: Leavenworth, WA, USA
Posts: 4 KK0743 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I have created a form in Frontpage and one of the items that is requested is the sender's e-mail address. The results of the form are already sent to my client's business as an e-mail as Frontpage provides this. What I want to do is have a script to take the individuals e-mail from the form and automaticlly send a response to them acknowledging that we have received their request. This is much like many sites do when you send an order and shortly after receive an e-mail thank you for your order. I simply want to thank the client for submitting their request and letting them know it will be acted upon with 24 hours.

Any help on a script to do this is appreciated.

Ken

Reply With Quote
  #2  
Old July 14th, 2000, 08:09 AM
tron's Avatar
tron tron is offline
SwollenMember
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Location: the master control
Posts: 264 tron User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 h 14 m 57 sec
Reputation Power: 13
well i would suggest using CGI, but if you are using front page, chances are you do not have perl installed on the server. Let me know if you have ASP or perl installed...I know of ways to do it with both of those, otherwise I dunno.

Reply With Quote
  #3  
Old July 15th, 2000, 02:41 AM
KK0743 KK0743 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Location: Leavenworth, WA, USA
Posts: 4 KK0743 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by tron:
well i would suggest using CGI, but if you are using front page, chances are you do not have perl installed on the server. Let me know if you have ASP or perl installed...I know of ways to do it with both of those, otherwise I dunno.[/quote]


Reply With Quote
  #4  
Old July 15th, 2000, 02:42 AM
KK0743 KK0743 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Location: Leavenworth, WA, USA
Posts: 4 KK0743 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Yes, they have perl and APS installed on thier server.

Look forward to hearin from you.

Ken

Reply With Quote
  #5  
Old July 30th, 2000, 04:58 PM
KK0743 KK0743 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Location: Leavenworth, WA, USA
Posts: 4 KK0743 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by tron:
well i would suggest using CGI, but if you are using front page, chances are you do not have perl installed on the server. Let me know if you have ASP or perl installed...I know of ways to do it with both of those, otherwise I dunno.[/quote]


Reply With Quote
  #6  
Old August 1st, 2000, 11:36 AM
JonLed JonLed is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Aug 2000
Location: Indiana
Posts: 614 JonLed User rank is Corporal (100 - 500 Reputation Level)JonLed User rank is Corporal (100 - 500 Reputation Level)JonLed User rank is Corporal (100 - 500 Reputation Level)JonLed User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 h 49 m 49 sec
Reputation Power: 14
Perl's your best bet:
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
#!/usr/bin/perl

#E-mail Script
#By Jon Coulter
#ledjon@ledjon.com
#http://www.ledjon.com


$mailprog = '/usr/sbin/sendmail'; #path to sendmail
$from = 'asdf@asf.com'; #your e-mail

&header;
&parse_data;
&check;

sub header {
print "Content-type: text/htmlnn";
}

sub parse_data {
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});

@pairs = split(/&/, $buffer);

foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;

$FORM{$name} = $value;
#push(@$name, $FORM{$name});
}
}

sub check {
&mail;
}

sub send {
$mail;
}

sub mail {
open(MAIL,"|$mailprog -t");
print MAIL "To: $FORM{email}n";
print MAIL "From: $from ($from)n";
print MAIL "Subject: Thanks for the Request!nn";
print MAIL "This is the body text!n";
close (MAIL);
}
[/code]
This isn't a tested script, so it might have a bug or two in it, but the idea's there. Some of the subroutines that are called in subroutines seem pointless, but this is a chopped down version of a more complex script I wrote a while ago... so I just left 'em in.

Be sure to use the POST method.

Hope this helped.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherBeginner Programming > E-mail to sender automatically from form results

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap