in reply to Using The Mail::Sendmail module in CGI Script
firstly i have tried by using the sendmail pipe there it worked perfectly and i was able to send mail but when i am using the module i am getting the error.It's not quite clear what do you mean by that sentence. Do you mean that the Mail::Sendmail module doesn't work under your cgi script although it works as normal Perl script?
Then get your script going, by the following snippet.SetEnv PERL5LIB /where/the/mods/are/:/where/else/lib
#!/usr/bin/perl -w use CGI ':standard'; # Newly inserted BEGIN { if ( $ENV{PERL5LIB} and $ENV{PERL5LIB} =~ /^(.*)$/ ) { # Blindly untaint. Taintchecking is to protect # from Web data; # the environment is under our control. eval "use lib '$_';" foreach ( reverse split( /:/, $1 ) ); } } use Mail::Sendmail; # The rest of the script....
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Using The Mail::Sendmail module in CGI Script
by msk_0984 (Friar) on Jul 19, 2006 at 08:56 UTC |