Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
  • #280915

    I’ve had problems getting the Contact form to send emails in the past and had previously solved it. It had to do with my host (Dreamhost), their security measures, and Gmail, I believe. The form was working, but I just started experiencing issues again and could really use your help.

    It seems that the contact form submission is properly delivered if the email that the user enters in the Email field is from any domain except Gmail. As soon as the user enters a Gmail account, the contact form submission doesn’t get delivered. The user does still receive a confirmation email.

    In the past, when I was having problem with form submissions, I tried one of the SMTP plugins and it didn’t work. I thought I was using Dude’s code (see below) in functions.php, but I couldn’t find it tonight when I looked. Should it be in the parent theme file or the child theme file?

    add_filter(‘avf_form_use_wpmail’, ‘avia_change_php_mail’, 10, 3);
    function avia_change_php_mail($active, $new_post, $form_params)
    {return true;}

    Any help you can offer would be MUCH appreciated.

    Thank you!


    Hi Alexa,

    Can you please create me an administrator account? post it here as a private reply.


    This reply has been marked as private.

    Hey Alexa!

    The form should work now with Gmail addresses, i fixed it by applying Peter’s code here.

    If you want to change the from email you can do it here:


    This reply has been marked as private.


    No, unfortunately not because your host/server does not allow you to send emails with a different tld. This policy/restriction should prevent spams but it also means that the email sender (“from”) must be a email address. The only way to direct that email to the address that the user enters in the “Email” field is to replace the email address manually when you answer the mail.

    Best regards,


    I think I have the same problem described above.
    Emails don’t arrive only when I post a gmail address in the email field, all the others I’ve tried instead arrived.

    thanks in advance for your help



    Try checking if this plugin is able to send e-mails to Gmail accounts:



    I’d rather use your own form instead of CF7.
    There is a way to solve this problem by changing the code?



    I don’t think this can be solved by “changing something in the code” as it seems the issue is related to the server and not the theme, that’s why i ask you to discard with a plugin.

    Here’s another discardment you can do without installing a plugin:
    – Create a new WordPress User with a gmail address assigned to it and set the password to be sent via e-mail.
    – Check if you get the WordPress message in the gmail address associated with this new User.



    Ok thanks, now it works.

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Contact Form Problem Related to Gmail’ is closed to new replies.