Subject: Ntsendmail
> I'm new to this and I'd like to know if anybody knows NTsendmail and
Never heard of it.
> how I can add variable that point to a textarea defined in a HTML
> file?
use CGI;
my $CGI = new CGI;
my $textarea = $CGI->param('TextareaName');
> I can run it now but it shows the example text defined in my pl
> script file.
Seems like you did not configure your webserver to actually run the
script. You are using MS IIS, right?
Go to Internet Services Manager, select the website, rightclick,
Properties, Home Directory, Configuration and add an "Application
Mapping" for .pl.
> I'd like to replace that message with the content of a
> textarea of a HTML file. And the mean time, is it possible to redirect
> the user to another web page once the form is lauched.
I'm not sure when do you want to redirect anyone ...
> Here is the script:
>
> print "HTTP/1.0 200 OK\n";
> print "Content-Type: text/html\n\n\n";
>
>
> #! /usr/bin/perl -w
> $|=1;
> use NTsendmail;
It might be better tu use a module that actually has some
documentation. Try Mail::Sender or MIME::Lite.
> $ENV{"NTsendmail"} = "192.168.100.4";
> $ENV{"NTsendmail_debug"}=1;
>
>
> #$ENV{"Message"} = $in{'Message'};
>
>
> my $mail = new NTsendmail;
>
> my $from = "Commis";
> my $to = "[EMAIL PROTECTED]";
> my $subject = "Message test from Commis";
> #my $Message = "$Message";
> my $Message = $Message;
> $mail->send($from, $to, $subject, $Message);
Even this module returns (or seems to try to return) error messages
if something fails. Check the return value of the $mail->send() call!
> exit 0;
No need to call exit().
Jenda
===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>