What should I check when Contact Form is NOT sending an email?

I believe I have the Contact Form set up correctly but it is not sending an email to the email set up. What should I be checking?

Thanks,

Tom

  • Ash
    • WordPress Hacker

    Hello @director98248

    I hope you are well today and thanks for asking the question.

    Would you please check if your wordpress is able to send email? Do you get email when you try to recover password or when someone registers? Also, you can check with this plugin: https://wordpress.org/plugins/check-email/

    If it doesn’t send email, you can try using a smtp plugin:

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

    https://wordpress.org/plugins/wp-mail-smtp/

    And if it still doesn’t send email, then you need to contact your host, they should fix it in your server.

    Hope it helps :slight_smile: Please feel free to ask more question if you have.

    Cheers

    Ash

  • Director98248
    • Site Builder, Child of Zeus

    I used the wp-mail-smtp plugin, and set it up using a gmail smtp. Followed the directions. It worked.

    So does that mean that for all my sites, I will need to set them up this way?

    I thought that wordpress had built in mailer program to work with like the contact form widget?

    I noticed in the instructions for doing the gmail smtp for gmail, it had this notice:

    No email from plugins?

    If you’re using plugins to send email, these plugins will ignore the SMTP settings if they call PHP’s mail() function directly. If you see the function mail() an d not wp_mail() in the plugin’s source, that’s the problem. You should be able to simply add wp_ in front of the existing mail command and it will probably work! (Insert lawyer-speak no warranty blurb here!)


    Would that fix the problem? Or should I just use this plugin and gmail smtp?

    Thanks,

    Tom

  • Director98248
    • Site Builder, Child of Zeus

    Got the problem solved.

    When you are adding the Contact Form Widget, in the Appearance/Widget admin area, there is a space to use for the email address, says it’s optional.

    I had added an email to it. For some reason, if it’s a different one from the admin, it won’t work??? I think.

    Anyway, Now if I leave it blank, it does send to the admins email, per Settings/General/admin email.

    Working now.

    Thanks,

    Tom

  • Ash
    • WordPress Hacker

    Hi @director98248

    Glad to know that it is resolved. The plugin uses wp_mail() – wp built in function. But I think when you want to add an email address in the widget box, you will need a smtp plugin. In fact, it depends on host and the receiver. Sometimes, gmail doesn’t receive emails if you don’t have proper heading, smtp plugins help in that case.

    Cheers

    Ash

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.