• Hello, I have installed the plugin Exec-php to be able to compile php scripts on my pages.

    It works fine, for example:

    <?php echo “qwerty”; ?>

    it shows querty (of course)…

    What I’m trying to do is sending a form for contacts. The page with the form is called “contact” and the form goes to a page called “sent” <form method=”post” action=”../sent/”>

    I can pass the variable with post, for example:

    <?php $formname = $_POST[‘formname’];
    echo $formname; ?>

    it shows the name that someone inserts in the form.

    When I go to mail it, it doesn’t work. So I try a very general script, like this:

    <?php

    $to = ‘info@xxx.com’;
    $subject = ‘the subject’;
    $message = ‘hello’;
    $headers = ‘From: webmaster@example.com’ . “\r\n” .
    ‘Reply-To: webmaster@example.com’ . “\r\n” .
    ‘X-Mailer: PHP/’ . phpversion();

    mail($to, $subject, $message, $headers);

    ?>

    (of course I have my domain instead of xxx)

    I get nothing, no mail…

    Can anyone help me?

  • The topic ‘Exec-php and mail’ is closed to new replies.