Wordpress Contact form not working

Discussion in 'General troubleshooting' started by scromer, Feb 27, 2014.

  1. I am running Wordpress 3.8.1 and am using contact form 7, there are no settings for SMTP that I can find but it's not sending messages. I get no error and it says it was sent successfully.
     
  2. martino

    martino DiscountASP.NET Staff

    I'm not sure what "Contact Form 7" uses as the SMTP service by default. But, if you're getting a message that it was sent successfully did you really get the message? Have you tried sending to an outside email address like Gmail to see if the message is received?

    I was able to find this web page article here: http://cool-tricks.net/contact-form-7-configuration/#configuration-of-wp-mail-smtp

    It refers you to install another plug in: http://wordpress.org/plugins/wp-mail-smtp/

    That plug in will allow you to set up your SMTP settings for the WordPress application.
     
    mjp likes this.
  3. First, it is important to know if you modified permalinks to a custom structure you had to create a custom error page to work to the following path: wp-404-handler.php

    If this is the case you first have to modify Contact Form 7 classes.php changing the following line:

    $url = wpcf7_get_request_uri();

    to

    $url = '/index.php/'.parse_url($_SERVER['REQUEST_URI']);

    For many the following articles and suggestions have worked, however for me I still have the same issue. I tried several others SMTP plugins in conjunction with Contact Form 7 plugin. The only plugin I was able to get a test email sent out was with Cimy Swift SMTP however I could not get the Contact Form 7 to send. I tested the same configurations on same server type on Godaddy without using SMTP plugin and it worked but I had to install a Form Mailer script to get Contact Form 7 that they provide in their control panel. Does DiscountASP.net have something similar or another workaround?

    Lastly when I hit send on the Contact Form 7 I do not get an error the two arrows just spin around.
     
  4. I decided to copy the script that Godaddy uses and removed the SMTP plugin. Now I can send email through Contact Form 7 with a successful green message however I am not receiving the email. I believe I am not writing the correct server path. I modified the server path on the webformmailer.php script from:

    $formhomedir = preg_replace('/.*\/home\/content/','',$_SERVER['DOCUMENT_ROOT']);
    $formhomedir = explode('/',$formhomedir);
    if (count($formhomedir) <= 4) {
    $formhome="/home/content/".$formhomedir[1]."/".$formhomedir[2]."/data/";
    }
    else {
    $formhome="/home/content/".$formhomedir[1]."/".$formhomedir[2]."/".$formhomedir[3]."/".$formhomedir[4]."/data/";
    }

    to

    $formhomedir = preg_replace('/.*\/web\/username/htdocs/','',$_SERVER['DOCUMENT_ROOT']);
    $formhomedir = explode('/',$formhomedir);
    if (count($formhomedir) <= 4) {
    $formhome="/web/username/htdocs/".$formhomedir[1]."/".$formhomedir[2]."/data/";
    }
    else {
    $formhome="/web/username/htdocs/".$formhomedir[1]."/".$formhomedir[2]."/".$formhomedir[3]."/".$formhomedir[4]."/data/";
    }

    Replacing "username" with my account username. Is this correct???
     

Share This Page