
AICapone
Deleted
May 15, 2001, 2:14 PM
Views: 540
|
Well yeah...gotta admit I was wrong: you are not building forum. Probably I misread you post :))) anyway, I just kinda made some scetches for you little problem. You could try something like this: #!/usr/bin/perl #####or wherever your perl use CGI qw(param); ###join CGI modul ########################## @body=param("body"); # taking $subj=param("subj"); # parameters from $from=param("from"); # some HTML form $to=param("to"); # add passing to our .pl $town=param("town i am from"); # your question about spaces $mailprog='/usr/sbin/sendmail/'; # wherever your mail ########################### ########################### $from=~s/@/\@/g; #changing @ to \@ so it won't $to=~s/@/\@/g; #count as an array foreach $lines (@body) { # if some one press enter $lines =~ s/\n/ /g; # while entering test in <text $lines =~ s/\n//g; } #area> it will count as new line ########################## ########################## open (MAIL,"| $mailprog"); #open mail print MAIL "To:$to\n"; # and print to: print MAIL "Subject: $subj\n"; #subject: print MAIL "From: $from\n"; #from print MAIL "heyya how is it going bo?\n"; #some text print MAIL "<font color=red>$town</font>\n"; #from print MAIL "CYA laterzzz"; #us personally (optional) print MAIL "@body"; #print whatever was in form print MAIL "$town"; # specially for you :))) close (MAIL); #n/c print "Content-type: text/html\n\n"; #n/c print <<HTML_GENERATING_FOR_FILE; # <<EOF <html><body bgcolor="#f2f2f2">hello, i think we're done don't you? <p>the mail has been send to <b>$to</b> from <b>$from</b> with subject <b>$subj</b> and body <b>@body</b> town <b>$town</b> HTML_GENERATING_FOR_FILE name this `mail.pl` and create mail.html with this in it: <html><head><tilte></title></head> <body bgcolor="#f2f2f2"> <FORM ACTION="mail.pl"> <table> <tr><td>To: <td><INPUT NAME="to" size=48> <tr><td>From:<td><input name=from size=48> <tr><td>Subj:<td><input name=subj size=48> <tr><td>Town:<td><input name="town i am from" size=48> <tr><td valign=top>Body: <td><TEXTAREA NAME="body" ROWS=10 COLS=38 WRAP="VIRTUAL" ></TEXTAREA><p> </table> <INPUT TYPE="submit" value="Get this"> <input type="reset" value="clean up"> </FORM> </html> well that about does it. Though I did not check my mail I am pretty sure this will work, if you have any questions feel free to ask - you are more than welcome AlCapone
|