blat

Discussion in 'Perl' started by paolo, Aug 19, 2003.

  1. paolo

    paolo Guest

    is there anyone who has used blat? I have problem when sending a mail
    from a cgi-script. Any errors arent displayed on the html-page, but
    the mail is not sent. the code looks like this:
    #!/usr/local/bin/perl
    print "Content-Type: text/plain\n\n";
    $from = '';
    $to = '';


    $subject = 'subject';
    $message = 'testmail';

    open OP,">cgi-bin/lettera";
    print OP "MIME-Version: 1.0\n";
    print OP "Content-Type: text/plain; charset=ISO-8859-1\n";
    print OP "Content-Transfer-Encoding: 8bit\n";
    print OP "To: ",$to,"\n";
    if ($from) {print OP "From: ",$from,"\n";}
    if ($subject) {print OP "Subject: ",$subject,"\n";}
    print OP "\n";
    print OP $message;
    close OP;
    system('g:/blat/blat.exe <cgi-bin/lettera');
    print "helo?";


    thanks in advance

    paolo
     
    paolo, Aug 19, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page