• Hello there!

    1st of all I would like to thank the developer of Contact Form 7 for its simplicity. I’ve installed it in my server, but If someone tries to send me through the form That I’ve created they will get this error “Failed to send your message. Please try later or contact administrator by other way.”.

    I have reinstalled the plugin and all, its active and all, but I cant fix the problem.

    Any suggestions? thanks for any help!

    http://wordpress.org/extend/plugins/contact-form-7/

Viewing 15 replies - 1 through 15 (of 18 total)
  • naskogashi,

    What color of border do you see? Red one?

    Thread Starter naskogashi

    (@naskogashi)

    Yeap a red bloodilicous one 🙂

    Red border means wp_mail() function really failed. Do you receive other mails from WordPress such as comment notifications?

    Thread Starter naskogashi

    (@naskogashi)

    Thanks alot for your time takayukister. Well let me say that in my previous host the script worked perfectly.

    Since Ive moved to yahoo hosting, the notifications didnt work until Ive installed the wordpress through their tools.

    I suspect that yahoo has its own settings to wp_mail(). Yeah I do get notofications for every comment, pings, message, forgot password and so on.

    So is there anything left for me to do?

    naskogashi, try to use the same sender address as other notifications, I mean, wordpress@<your-domain> or like that. Yahoo might filter mails based on sender address.

    Thread Starter naskogashi

    (@naskogashi)

    I just did! Its not helping! Same error 🙁

    mmm, curious. Is it possible to see the source code of WordPress on the Yahoo hosting? I’m wondering if wp-includes/pluggable.php is the same one as original. Or are there special plugins made by Yahoo working???

    Thread Starter naskogashi

    (@naskogashi)

    Here is the my pluggable.php from my wordpress in yahoo:
    http://nasko.biz/etc/pluggable.rar
    ………………………………………………..

    Well as I’ve understood all the plugins work expet those that have to do with wp_mail().

    Here is the adress to Contact Form 7 plugin in my site:
    http://nasko.biz/web/?page_id=41

    Thanks again for your time!

    I’m having this same issue, on a self-hosted WordPress site – schumachertileandstone.com. Was there a fix found?

    Thanks!

    Ossu minna sama!

    I dunno if we’re experiencing the same issue… I know only that I couldn’t send mails using Contact Form 7, with a newly wordpress 2.7 installation. My PHP version is 5.2.4, and my server has a sendmail installed in /usr/sbin/sendmail. Just a common web server (Apache) with PHP installed.

    I tried, after some googleing, use wp-mail-smtp plugin. But my Yahoo! account seems have problems to let PHP use it as main account to send mails through SMTP (instead of the mail php function + local sendmail). After that, I tried again using Contact Form and wp_mail function. Which, by the way, was using now mail() PHP function to send the mail. Just as you guys should be trying to do now.

    After some time thinking about the problems in directly editing the Contact Form 7 Plugin in WordPress Theme Editor, I changed two lines of code and it worked. Seems to be some problem with the headers that the plugin uses when sending mails.

    //(...)
                }
                //return @wp_mail($mail_recipient, $mail_subject, $mail_body, $mail_headers, $for_this_mail);
                return @wp_mail($mail_recipient, $mail_subject, $mail_body);
            } else {
                //return @wp_mail($mail_recipient, $mail_subject, $mail_body, $mail_headers);
                return @wp_mail($mail_recipient, $mail_subject, $mail_body);
            }
            // (...)

    Actually, I thought about it after seeing wp-mail-smtp plugin testing the mail function. In the plugin code, they used the php mail function this way (TO, SUBJECT, BODY) and it worked… while wp_mail function sending the mail_headers parameter was broken.

    Maybe Contact Form 7 guys can check what’s wrong with the plugin and the header stuff.

    Cheers!!! Yoroshiku!!! ( ^ u ^)v

    Hi kinow, do you mean this wp-mail-smtp plugin?

    http://wordpress.org/extend/plugins/wp-mail-smtp/

    I’ll take a look at it.

    By the way, if you change the code like this, does it still fail to send?

    }
        //return @wp_mail($mail_recipient, $mail_subject, $mail_body, $mail_headers, $for_this_mail);
        return @wp_mail($mail_recipient, $mail_subject, $mail_body, 'YOUR NAME <your-mail-address@your-host>');
    } else {
        //return @wp_mail($mail_recipient, $mail_subject, $mail_body, $mail_headers);
        return @wp_mail($mail_recipient, $mail_subject, $mail_body, 'YOUR NAME <your-mail-address@your-host>');
    }

    (change the <your-mail-address@your-host> to your right address)

    Sorry, my last code is incorrect. The correct one is below:

    }
        //return @wp_mail($mail_recipient, $mail_subject, $mail_body, $mail_headers, $for_this_mail);
        return @wp_mail($mail_recipient, $mail_subject, $mail_body, 'From: YOUR NAME <your-mail-address@your-host>');
    } else {
        //return @wp_mail($mail_recipient, $mail_subject, $mail_body, $mail_headers);
        return @wp_mail($mail_recipient, $mail_subject, $mail_body, 'From: YOUR NAME <your-mail-address@your-host>');
    }

    I have been experiencing the same issue only the site is hosted on BlueHost. I tried modifying wp-contact-form-7.php first using takayukister’s code in the message directly above this, no change.

    I then deleted the code per Kinow’s post and it worked for the site. Great fix, thank you.

    florida-internet-marketing

    (@florida-internet-marketing)

    Thank you for the fix, I also found out that if you change the name of the form, it will still show up, but not send. So if you have the same form on a few pages and change the name, make sure to change it everywhere else

    Thanks for the fix but there is still a problem regarding with the results. I did modify Contact Form 7 straight from the WordPress Plugin Editor using Kinow’s code.

    I tried to send a test Email but I can only see the “Subject” and the “Message Body” in my inbox as what i entered in the contact form. My problem is, I want to know why the “Name” stays as my website name and the “Email” stays as the email I did set for my wp-mail-smtp plugin EVENTHOU i entered a different Name and Email at those text areas….

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Contact Form 7 error’ is closed to new replies.