Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Sending Mail

by sandy1028 (Sexton)
on Aug 16, 2007 at 09:14 UTC ( [id://632965]=perlquestion: print w/replies, xml ) Need Help??

sandy1028 has asked for the wisdom of the Perl Monks concerning the following question:

Hi, How to get the variables from php which is sent in <form action=""> I am getting error: $mail_server" requires explicit package name at a.pl line 6 Is the code wrong.
#!/usr/bin/perl use Mail::Sendmail; use strict; use warnings; $mail_server = 'xxx.xxx.xx.xx'; #$email= $_POST['email']; $mail_to = 'abc@xyz.in'; $mail_from ='xyz@bac.in'; $body="Test Mail"; $subject = 'Test Mail'; mail($mail_server, $mail_from, $mail_to, $subject, $body);

Replies are listed 'Best First'.
Re: Sending Mail
by Taulmarill (Deacon) on Aug 16, 2007 at 09:40 UTC
    When you use strict; you have to initialize all variables with the function my.
    I.e. my $mail_server = 'xxx.xxx.xx.xx';
      How to get the variables from php file to perl files... Is there any way to get the variables from php file
        Why try to pass between the two languages? Why not set up a mailing form and mail script in either Perl or PHP?
Re: Sending Mail
by Anonymous Monk on Aug 16, 2007 at 12:05 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://632965]
Approved by GrandFather
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2024-04-16 07:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found