#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Cape Town, WP, South Africa
    Posts
    39
    Rep Power
    14
    #!/usr/local/bin/perl

    use CGI;
    $q = new CGI;

    $fname= $q->param('fname');
    $fname= $q->param('sname');
    $initials = $q->param('initials');
    $title = $q->param('title');

    $mail = '1';
    $mailprog = '/var/qmail/bin/qmail-inject';
    $recipient = 'c.dyason@ponl.com';
    $email = 'chrisdice4@yahoo.com';

    if ($mail eq '1') {
    open (MAIL, "|$mailprog $recipient") | | die "Can't open $mailprog!n";

    print MAIL "Reply-to: $emailn";
    print MAIL "From: $email n";
    print MAIL "Subject: Bond Applicationnn";
    print MAIL "Succesfull Bond Applicant:nn";
    print MAIL "------------------------------------------------------n";
    print MAIL "this is a testn";
    print MAIL "this is a test";

    if ( $fname ){
    print MAIL " <$fname>";
    }

    print MAIL "n";

    if ( $sname ){
    print MAIL "<$sname>";
    }

    if ( $initials){
    print MAIL " <$initials>";
    }

    if ( $initials){
    print MAIL " <$title>";
    }
    }
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    73
    Rep Power
    14
    Haven't checked this out but 2 things occur to me

    close (MAIL);

    at the end

    also should the recipient appear as

    print MAIL "To: $recipientn"

    and the open mail be something like this

    open (MAIL, "| $mailprog -t -oi") | | die "Can't open $mailprog ! $_n";



    [This message has been edited by des (edited December 06, 2000).]

IMN logo majestic logo threadwatch logo seochat tools logo