$from _address will not interpolate in single quotes. No quotes needed
around $from_address, $to_address or $subject.

Cheers,
Kevin

On Fri, Mar 28, 2003 at 12:12:44PM -0700, Robbie Staufer ([EMAIL PROTECTED]) said 
something similar to:
> Hi,
> 
> I have a perl script that takes in form data and generates and email 
> with the data to be sent to me.  I'm getting the error message   
>  Error:Bad or missing From address: '$from_address'.  The webmaster says 
> I'm using the correct from address, so, any ideas about this error message?
> 
> Thanks.
> Robbie
> 
> Here's what I have:
> 
> ### send mail #####
> 
> $from_address = "[EMAIL PROTECTED]";
> $to_address = "[EMAIL PROTECTED]";
> $subject = "ESMF Registration Form";
> 
> %mail = (
>         SMTP    => 'finster.scd.ucar.edu',
>         from    => '$from_address',
>         to      => '$to_address',
>         subject => '$subject',
>         );
> 
> $mail{body} = <<END_OF_BODY;
> 
> First Name: $fname
> Last Name: $lname
> Email: $email
> Organization: $org
> Scientific Interest: $sci_int
> Mailing List? $check
> 
> sendmail(%mail) || print "Error: $Mail::Sendmail::error\n";
> 
> 
> -- 
> -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
> Robbie Staufer
> NCAR/SCD
> 1850 Table Mesa Dr. Rm. 42
> Boulder, CO. 80305
> (303) 497-1836
> 

-- 
[Writing CGI Applications with Perl - http://perlcgi-book.com]
"I know the human being and fish can coexist peacefully."
        -- G.W. Bush, Saginaw, MI 09/29/2000

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to