The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Other
> Beginner Programming
|
E-mail to sender automatically from form results
Discuss E-mail to sender automatically from form results in the Beginner Programming forum on Dev Shed. E-mail to sender automatically from form results Beginner Programming forum discussing problems and solutions for just about any issue. Experienced programmers offer their help to those just starting out.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

July 13th, 2000, 01:37 PM
|
|
Junior Member
|
|
Join Date: Jul 2000
Location: Leavenworth, WA, USA
Posts: 4
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
|

July 14th, 2000, 08:09 AM
|
 |
SwollenMember
|
|
Join Date: Jun 2000
Location: the master control
Posts: 264
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.
|

July 15th, 2000, 02:41 AM
|
|
Junior Member
|
|
Join Date: Jul 2000
Location: Leavenworth, WA, USA
Posts: 4
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]
|

July 15th, 2000, 02:42 AM
|
|
Junior Member
|
|
Join Date: Jul 2000
Location: Leavenworth, WA, USA
Posts: 4
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
|

July 30th, 2000, 04:58 PM
|
|
Junior Member
|
|
Join Date: Jul 2000
Location: Leavenworth, WA, USA
Posts: 4
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]
|

August 1st, 2000, 11:36 AM
|
|
Contributing User
|
|
Join Date: Aug 2000
Location: Indiana
Posts: 614
  
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;
✓
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.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|