I tried the double brackets, but no luck :(
Here is the code I use for my NET::SMTP, it seems to work OK for me using
Windows 98.
$server = '192.168.68.1'; #server name or ip address
$from= "$INPUT{name}$INPUT{atsign}fbu-brokers.co.nz"; #just an email
#address, but I get mine from the form
$to= "$INPUT{email}"; #also just an email address
$subject= 'test';
$body=$mymessage; #any string here, I have HTML in mine which is why I #have
the MIME-Version and Content-type below.
$objMail=Net::SMTP->new($server);
$objMail->mail($from);
$objMail->to($to);
$objMail->data();
$objMail->datasend("MIME-Version: 1.0\n");
$objMail->datasend("Content-type: text/html;");
$objMail->datasend("Subject: $subject\n");
$objMail->datasend("To: $to\n");
$objMail->datasend("From: $from\n");
$objMail->datasend("\n");
$objMail->datasend($body);
$objMail->dataend();
$objMail->quit;
Hope it works for you,
Chris.
>{$INPUT{field_name}} ? wonder if that would work. It is supposed to
>evaluate what's inside the curly braces first. If it doesn't, then just
turn
>them into simple variables and use the simple variable instead.
>
>$field_name = $INPUT{field_name};
>
>I'd sure love to see a working example of NET::SMTP, not that you have to,
>but
>I'm sure I would use it.
>
>Gary
> -----Original Message-----
> From: Chris Zampese [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, December 20, 2001 4:43 PM
> To: perl list
> Subject: quick regex question
>
>
> I have a program that takes input from a form, splits it and saves
> the values in an array - $INPUT{field}
> I then create a NET::SMTP mail instance, and message is a string
> ($mymessage) in which I have inserted the form values.
> This is so that I can create a form which when submitted will send
> another form with part of the data in its fields.
> So my $mymessage looks like this (but alot longer)...
>
> $mymessage='<HTML><HEAD></HEAD><BODY>
> <form name =formname>
> <BR>
> <input type = text name=whatever value=$INPUT{field_name}>
> etc
>
> then I want to pass the string through a regex so that it will
> espand all the $INPUT{field_name} occurances.
> I found a regex in the perldocs that will expand a variable
> -#$mymessage =~ s/(\$\w+)/$1/eeg;
> but it does not expand the {field_name}, so all I get in my emailed
> form boxes is {field_name}.
>
> Some help would be greatly appreciated, sorry that this email is so
> long, but it took me a long time to get to the point that the form
> would mail correctly etc, so I am quite excited about getting the
> details fixed,
> Thanks heaps in advance,
> Chris
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]