contact_form plugin not working

i have cannot get the contact form plugin to work..the form works but i am not recieving any email...i have tried everthing. also, email works fine on comments so i dont think it is my host.

go to lab55.com

click on "contact"

does the contact page need to be somewhere other than theme/"yourtheme" directory?
«1

Comments

  • acrylian Administrator, Developer
    Looks everything alright. Did you fill in a email adress in the plugin's options? The plugin as stated in the doc does not use the admin email adress.
  • i have tried a few different email addresses, still nothing.. any other ideas?
  • acrylian Administrator, Developer
    I am sorry, I have no idea. It's working on my host. The function that is used for mailing is basically the function that is used for the comments mail, too.
  • I still have this same problem as lionel77, and I posted about it some weeks back in a thread.

    I can receive emails about comments just fine, as to to every email from the system except from the Contact plugin.
  • acrylian Administrator, Developer
    I would love to solve that but it's hard without being able to reproduce it. Do you get any error in your log? Which php version do you both run? Lacking other ideas I now have a suspicion that we maybe have a php version conflict here. Could you please try the following:

    Change line 191 of contact_form.php
    `UTF8::send_mail(getOption("contactform_mailadress"), $subject, $message, $headers);`
    to
    `
    $utf = new UTF8;
    $utf->send_mail(getOption("contactform_mailadress"), $subject, $message, $headers);
    `
    A wild guess though...
  • I gave this a try, no change.

    No error in logs.

    PHP version 5.2.5
  • @acrylian

    Would you be interested in getting access to a folder to put up zenphoto on my server (surpass hosting)? to try out Zenphoto.

    will give you ftp access to the folder and make a sql database for you.

    just wondering about support in the future.
  • acrylian Administrator, Developer
    A thing you could try is to use the pure php function `mail()` without our utf8-stuff.
    Replace
    `UTF8::send_mail(getOption("contactform_mailadress"), $subject, $message, $headers);`
    with
    `mail(getOption("contactform_mailadress"), $subject, $message, $headers);`
  • acrylian Administrator, Developer
    Please also read the entry on php mail here: http://de.php.net/manual/en/function.mail.php
  • I gave

    `
    mail(getOption("contactform_mailadress"), $subject, $message, $headers);
    `
    a try and it is a no go ether...

    The offer to get space on my server is still up for you guys.
  • acrylian Administrator, Developer
    Could you please add a line before that to print the variables? Maybe somehow some are empty or whatever so that it prevents from sending.. The contact form is regarding the actual mailing really nothing that special....

    Please try also to use that function with plain text directly.

    Thanks for the offer, but I currently don't know what to look for except the suggestion just made.
  • Do you care to explain this a bit better please? Code wise.

    I have my mind set to a little project I am working for an exhibition right now so I might be a bit slow thinking at the moment on this case here. I really would like this problem solved as seem more people on the forum, and I am going to try to put as much time into testing as I can.

    if not I will have a look at what you just said in few days and try to make some sense out of it for me to do some tests.

    Thanks for your time yet again Malte.

    P.s. I got an interesting error when I did some quick playing in the file. :)

    `Parse error: syntax error, unexpected ')', expecting T_PAAMAYIM_NEKUDOTAYIM`
  • acrylian Administrator, Developer
    I mean just add before the mail part a simple `echo $subject; echo $message; echo $headers` so that we can see their values. Maybe somehow the post data is not going through.

    Regarding the mail function try that on a page directly like <?php mail(<your values>); ?> to see if that itself does work. It seems some servers do not sent mails.
  • Hi acrylian, thanks for the pointer over to this thread. I tried using`mail(getOption("contactform_mailadress"), $subject, $message, $headers);` but no luck.
  • ahh yeah... I did a quick test.

    `echo $subject; echo $message; echo $headers;`

    Returned this.

    `
    Subject (Gallery)Message TitleName First Last Company Street City Country email@to.reply.to.test 1234567 http://www.test.com From: email@to.reply.to.test Reply-To: email@to.reply.to.test X-Mailer: PHP/5.2.5 Cc: email@to.reply.to.test
    `
    Screenshot for a better look at what was in the fields.

    http://img.skitch.com/20081013-qsb2qwy31cfcts5x5hp6q5983g.jpg
  • acrylian Administrator, Developer
    Looks quite normal I would say. I am really clueless then...
  • I just made a random php file and put it into a folder on my server with an example from the page you posted.

    `


    Birthday Reminders for August


    Here are the birthdays upcoming in August!
    PersonDayMonthYear
    Joe3rdAugust1970
    Sally17thAugust1973

    ';

    // To send HTML mail, the Content-type header must be set
    $headers = 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

    // Additional headers
    $headers .= 'To: Mary , Oli ' . "\r\n";
    $headers .= 'From: Birthday Reminder ' . "\r\n";
    $headers .= 'Cc: xxxxxx@xxxxxx.com' . "\r\n";
    $headers .= 'Bcc: xxxxx@xxxxx.com' . "\r\n";

    // Mail it
    mail($to, $subject, $message, $headers);
    ?>
    `
    opened it and I got emails pretty much 1 sec later.

    Screeshot
    http://img.skitch.com/20081013-pfx7dji32kic8u3mtjk1afdk5b.jpg
  • acrylian Administrator, Developer
    Ah, probably it's the missing mime-version and content type then. Could you add these two to the contact_form.php in line 161/162?
  • well only if it was that simple... Well I guess it does not hurt to put it in the code however....

    its a no go.

    its not something in the confirm process...??? its so strange this only happens on some servers.
  • acrylian, not sure if I completely understand all this but I tried olihar's php file above and it worked (well the mails got caught in my servers spam filter) so I added the mime and content headers to contact_form.php in line 161/162 as you suggest but still no mail arriving.
  • acrylian Administrator, Developer
    Hm, well... Anyway, I have added the missing headers to the form and made a version with the zenphoto modified zenphoto mail function and one with the standard mail(). Please try both.You can download both here: http://zenpage.maltem.de/zenpage/contactforms.zip
  • Downloaded the zip and tried both versions, still nothing:-(
  • yeah I 2nd that.

    I wonder what happens if the confirm feature would not be there...

    Could there be a connection between this and the bug I found about the subject field...

    They who can get it to work are they all on the same PHP version and visa versa for the ones having problems...
  • I'm on php 4.4.4
  • `
    Apache version 1.3.41 (Unix)
    PHP version 5.2.5
    MySQL version 5.0.51a-community
    Architecture x86_64
    Operating system Linux
    `
    And yes not working.
  • acrylian Administrator, Developer
    olihar, I think you hit the nail.... Shame on me...
  • hehe... please explain...
  • acrylian Administrator, Developer
    The confirm button posts a form but it does not post subject, headers and message so they will be empty on the actual mail send since posting a form clears variables.... That's actually a beginner's mistake...I wonder why I did not discover that in my tests...

    Here is a new version, please test it again to be sure before I put it into the svn:
    http://zenpage.maltem.de/zenpage/contactform-reloaded.zip

    Thanks you both for you patience and helping fix this...
  • just tested no change... Strange as well that before you made this change it worked for you...
  • acrylian Administrator, Developer
    The one uses the UTF8::send_mail part. Maybe try using mail() directly again...
Sign In or Register to comment.