Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

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 line 6 Is the code wrong.
#!/usr/bin/perl use Mail::Sendmail; use strict; use warnings; $mail_server = ''; #$email= $_POST['email']; $mail_to = ''; $mail_from =''; $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 = '';
      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?

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-04-21 20:21 GMT
Find Nodes?
    Voting Booth?

    No recent polls found