Forums

WordPress contact form plugins don't work on Linux server (9 posts)

  1. robcub
    Member
    Posted 4 months ago #

    Hi,

    I'm trying to set up a site with a few contact forms on it in WordPress. ONe of the forms is quite complicated with a few drop downs, radio buttons, etc. Usually this is no problem – I use Contact Form 7 and do it all in a WYSIWYG way and the form is created.

    However, I'm doing this on a client server – a French (Apache on Linux) host called OVH – and none of them work. They never send an email to the recipient.

    It's difficult getting a message through to the host as they keep on coming back saying that they've tested the server with:

    <?php
         mail('email_destinataire', 'sujet', 'message');
    ?>

    and it works but I don't want to go and code all these forms manually in PHP – it would take me ages as I'm not great with PHP.

    Does anyone know why several contact form plugins would not send mail from a particular server?

    What can I say to the host to get them to help me?

    Sorry if I should have put this on the Plugins category. I put it here as it's about several plugins not just one.

  2. esmi
    Theme Diva & Forum Moderator
    Posted 4 months ago #

    This not a Linux or CF7 issue. I always use Linux servers and I have quite a few sites running CF7 quite happily and effectively. It sounds like your hosts may have disabled the PHP mail functionality. If so, see E-mailed_passwords_are_not_being_received.

  3. robcub
    Member
    Posted 4 months ago #

    esmi, thank you.

    I agree, I have used CF7 on countless Linux servers with no problem. And now I can't get even the default form to work.

    I didn't quite get the link you sent, although it's good to know that WordPress uses the standard PHP mail function.

    I will tell them this and hope that they will help me.

  4. esmi
    Theme Diva & Forum Moderator
    Posted 4 months ago #

    Some host block access to the PHP mail() function for "security reasons". WP and most mail plugins will automatically try to use the blocked function and then fail silently. On such servers, you usually have to install an SMTP plugin that redirects all calls to PHP mail() to the host's SMTP server.

  5. robcub
    Member
    Posted 4 months ago #

    Thanks for that. I'm still trying to get it to work, though.

    I've put in all the details in Advanced Email Options in WP Mail SMTP but I get

    SMTP -> ERROR: Failed to connect to server: Connection timed out (110)
    SMTP Error: Could not connect to SMTP host.

    when I try to send the test email.

  6. esmi
    Theme Diva & Forum Moderator
    Posted 4 months ago #

    I can only suggest that you contact the hosts and double-check their SMTP details.

  7. robcub
    Member
    Posted 4 months ago #

    Thank you, esmi, I'm sure there's a simple explanation. Really appreciate your help so far.

  8. robcub
    Member
    Posted 4 months ago #

    I have now set the Advanced Email Options that you get with the SMTP plugin to "Use the PHP mail() function to send emails" and I'm starting to get some success.

    Only problem now is weird: I'm using the French version of WP and only the forms in French will work!!! You know when you create a new form in CF7 it asks you the language – it only works in the default language – French.

    So I'm now going to reinstall WP using the English version. Wish me luck!

  9. robcub
    Member
    Posted 4 months ago #

    No... that didn't work. I've reinstalled WordPress - the English version and still the CF7 forms in French work and in English they don't work!

Reply

You must log in to post.

About this Topic