Calling PHP email program from a Perl Script

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • rahulthathoo

    Calling PHP email program from a Perl Script

    Hi,

    After i finish some amount of computation using a perl script, i need
    to send out an email to a receipient which can change and is known to
    the Perl script. Is there a way to call the email.php(the php program
    to send out the email) passing to it the recipient email ID, from the
    perl script?

    Rahul

  • Toby A Inkster

    #2
    Re: Calling PHP email program from a Perl Script

    rahulthathoo wrote:
    After i finish some amount of computation using a perl script, i need
    to send out an email to a receipient which can change and is known to
    the Perl script. Is there a way to call the email.php(the php program
    to send out the email) passing to it the recipient email ID, from the
    perl script?
    In Perl:

    system("php email.php 'foo@example.co m'");

    In PHP:

    <?php
    $recip = $_SERVER['argv'][1];
    if (!isset($recip) )
    $recip = 'default-address@example .com';
    ?>

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
    Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

    * = I'm getting there!

    Comment

    Working...