|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
||||
|
||||
|
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.
|
|
#3
|
|||
|
|||
|
<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] |
|
#4
|
|||
|
|||
|
Yes, they have perl and APS installed on thier server.
Look forward to hearin from you. Ken |
|
#5
|
|||
|
|||
|
<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] |
|
#6
|
|||
|
|||
|
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. |
![]() |
| Viewing: Dev Shed Forums > Other > Beginner Programming > E-mail to sender automatically from form results |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|