Don Marti

Sun 17 Apr 2005 08:33:53 PM PDT

Dude, use modules

Seth writes about an ancient CGI vulnerability.

It might have Hack Value to write your own query string parser or your own code to invoke standard utilities, but, really, better to just use a module.

use strict;
use Mail::Sendmail;

...

sendmail ( 'From'    => $FROM,
           'To'      => $to,
           'smtp'    => $SMTP_SERVER,
           'Subject' => $what,
           'Message' => $text
         ) or die $Mail::Sendmail::error;

Here's the Mail::Sendmail FAQ.