Jump to content

Problems with Form Template Processor


DV-JF
 Share

Recommended Posts

Hey,

I've a problem,witch i cant solve by myself so I hope you have any ideas what to do:

I want to use FormTemplateProcessor here are my settings:

A template called contact_form with two fields - contact_mail and contact_text - no template file associated.

A template called contact with standard fields - title + body + images and so on - associated to contact.php

<?php

/**
 * Kontakt Seite
 *
 */

include("./head.inc"); ?>
<div class="main wrapper clearfix">

    <article class="clearfix">
        <h2><?php echo $page->get("headline|title");?></h2>
        <?php echo $page->body; ?>
    </article>

<?php
$form = $modules->get('FormTemplateProcessor');
$form->template = $templates->get('contact_form');
$form->requiredFields = array('contact_email');
$form->email = 'mail@mail.com'; 
echo $form->render(); 
?>

</div> <!-- #main -->

<?include("./foot.inc"); ?>

This looks fine to me and if i try if it works on frontpage, everything seems to work. I got the message, that my submission has been sent. BUT I got no Mail.

I've tested it with various e-mail addresses, checked my spambox,  but I cant find a mail from my form.

I've thought, that maybe there might be something wrong with my Server, but the log-file seems fine to me:

188.111.105.10 - - [21/Jan/2013:10:07:48 +0100] "POST /kontakt-email/ HTTP/1.1" 200 4643 "http://www.mydomain.de/kontakt-email/" "Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20100101 Firefox/17.0" "www.mydomain.de"

I don't know where to search for errors. Perhaps I have to mention that I'm using a various admin path...

Would like to hear your advices.

Many greets, Jens alias DV-JF

Link to comment
Share on other sites

Perhaps php mail isn't installed or doesn't work. Can you try to mail with the following code?

$to = "your@email.address";
$header = "From: {$to}";
$subject = "Test";
$body = "Test body";
if (mail($to, $subject, $body, $header)) {
    echo("Success");
} else {
    echo("Failed");
}
  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...