• Das Erstellen neuer Accounts wurde ausgesetzt. Bei berechtigtem Interesse bitte Kontaktaufnahme über die üblichen Wege. Beste Grüße der Admin

sendmail in CGI

LairdGerd

New member
Hallo,

ich finde kein CGI-Forum, darum poste ich hier :

Ich bekomme den sendmail-Befehl im script nicht auf die Reihe. Kann jemand helfen?
Danke im voraus

-----------------------------------------



#!/usr/local/bin/perl
use CGI;
# Path of system date. Change if appropriate.
$date_command = "/usr/bin/date";

# Get the System Date
$date = `$date_command +"%A, %B %d, %Y at %T (%Z)"`; chop($date);

# Read the CGI data
$input = new CGI;


$Name = $input->param('Name');
$Title = $input->param('Title');
$Company = $input->param('Company');
$Address1 = $input->param('Address1');
$Address2 = $input->param('Address2');
$Address3 = $input->param('Address3');
$Address4 = $input->param('Address4');
$Email = $input->param('Email');
$Phone = $input->param('Phone');
$Comments = $input->param('Comments');
$check1 = $input->param('Check1');
$check2 = $input->param('Check2');
$check3 = $input->param('Check3');


if ( 0
|| !$Name|| !$Title|| !$Company|| !$Address1)
{
print "Content-type: text/html\n\n";
print <<EOF;
<body bgcolor="#ffffcc">
<b>Sorry, you must fill in all fields.</b>
<br>Please press the BACK button on your browser to return to the
form.
EOF
}
else {
open(MAIL,"|$sendmail -t WebSite gerd\@uk2.net");

print MAIL <<EOM;
----------------------------------------------------
Response from Web Site
$date
----------------------------------------------------
Name : $Name
Title : $Title
Company: $Company
Address1: $Address1
Address2: $Address2
Address3: $Address3
Address4: $Address4
Email: $Email
Telephone : $Phone
Comments : $Comments

EOM




if ($check1)
{
print MAIL "Send company literature";
}

if ($check2)
{
print MAIL "Have a salesperson contact me";
}
if ($check3)
{
print MAIL "Update me on new products";
}

close(MAIL);

# Print HTTP header
print "Content-type: text/html\n\n";

# feedback.html is the page users see after filling in the form
print "<META HTTP-EQUIV=\"REFRESH\" CONTENT=\"0;URL=/feedback.html\">";
}
 
hi,
wir haben ein forum, das da heisst "Serverseitige Programmierung - PHP3/4, CGI, Perl & ASP sind des Webmasters Freund oder Alptraum.."
ich hab dich mal da hingebeamt.
ciao,
mm
 
Zurück
Oben