Don't have much time right now, but here it goes:
The last CGI I used for sending an email is here,
bmake sure your file is executable!#!/usr/bin/perl -wT
use CGI qw(:standard);
#use CGI::Carp qw(warningsToBrowser fatalsToBrowser);
use strict;
print header;
print start_html("");
my %form;
my $send_bcc;
my $send_subject;
my $send_msg;
my $send_from;
my $send_raid;
$send_from="myemailaddress\@mydomain.com";
foreach my $p (param()) {
$form{$p} = param($p);
#print "$p = $form{$p}
\n";
if ($p eq "send_bcc") {
$send_bcc=$form{$p};
}
if ($p eq "subject") {
$send_subject=$form{$p};
}
if ($p eq "msg") {
$send_msg=$form{$p};
}
if ($p eq "raid") {
$send_raid=$form{$p};
}
}
sendmail($send_from,$send_bcc,$send_subject,$send_msg);
print end_html;
sub sendmail {
my ($from, $bcc, $subject, $message) = @_;
$ENV{PATH} = "/usr/lib";
open (MAIL, "|/usr/lib/sendmail -oi -t") or
&dienice("Can't fork for sendmail: $!\n");
print MAIL "From: $from\n";
print MAIL "Bcc: $bcc\n";
print MAIL "Subject: $subject\n\n";
print MAIL "$message\n";
close(MAIL);
}
sub dienice {
my($errmsg) = @_;
print "
Error
\n";
print "
$errmsg
\n";
print end_html;
exit;
}
In here the variables "$send_bcc, $send_subject, $send_msgetc..." are defined by the form fields, up to you to change them.
If you can't get it to work, send your script to saw_at_onpoi_dot_net. I'll get around it this week end.
OT:
For the options:
Yes, I have a mic and use Teamspeak.
No, I dont have a mic.
I have a mic but I cannot get Teamspeak to work.
Use an input type "radio" instead of an input type "checkbox" if you want your users to select only one option.